Rev 150: Merge Andrew's branch, handle the return value from get_memory() in http://bazaar.launchpad.net/~meliae-dev/meliae/trunk
John Arbash Meinel
john at arbash-meinel.com
Mon Jul 12 21:10:40 BST 2010
At http://bazaar.launchpad.net/~meliae-dev/meliae/trunk
------------------------------------------------------------
revno: 150 [merge]
revision-id: john at arbash-meinel.com-20100712201034-kkjc4c1v6pmdsb6r
parent: john at arbash-meinel.com-20100712200244-9lxd6vsno86x6xx9
parent: andrew at bemusement.org-20100624140621-1dr1zpf3kvjmvnvx
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Mon 2010-07-12 15:10:34 -0500
message:
Merge Andrew's branch, handle the return value from get_memory()
modified:
track_memory.py track_memory.py-20091027161645-q92bqfwfmtf0ywgq-1
-------------- next part --------------
=== modified file 'track_memory.py'
--- a/track_memory.py 2009-10-27 16:18:10 +0000
+++ b/track_memory.py 2010-07-12 20:10:34 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Canonical Ltd
+# Copyright (C) 2009, 2010 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
@@ -32,6 +32,9 @@
while p.poll() is None:
now = timer()
cur_mem, peak_mem = perf_counter.perf_counter.get_memory(p)
+ if cur_mem is None or peak_mem is None:
+ p.wait()
+ break
mem_secs += cur_mem * (now - last)
last = now
time.sleep(opts.sleep_time)
More information about the bazaar-commits
mailing list