|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Fix reporting of time intervals in the log mode of XenMo
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 0ad422291688b5b3d497a0cedfb2be045589c721
# Parent d60392d5b8187c98b90a56485dcc8857d834b56c
Fix reporting of time intervals in the log mode of XenMon.
Fix duration to sleep between iterations (earlier hardcoded to 1sec)
Signed-off-by: Diwaker Gupta <dgupta@xxxxxxxxxxx>
diff -r d60392d5b818 -r 0ad422291688 tools/xenmon/xenmon.py
--- a/tools/xenmon/xenmon.py Mon Mar 6 19:29:39 2006
+++ b/tools/xenmon/xenmon.py Mon Mar 6 22:47:14 2006
@@ -502,6 +502,7 @@
shm = mmap.mmap(shmf.fileno(), QOS_DATA_SIZE)
interval = 0
+ curr = last = time.time()
outfiles = {}
for dom in range(0, NDOMAINS):
outfiles[dom] = Delayed("%s-dom%d.log" % (options.prefix, dom), 'w')
@@ -561,9 +562,10 @@
h1[dom][4],
h1[dom][5][0], h1[dom][5][1]))
outfiles[dom].flush()
-
- interval += options.interval
- time.sleep(1)
+ curr = time.time()
+ interval += (curr - last) * 1000
+ last = curr
+ time.sleep(options.interval / 1000.0)
for dom in range(0, NDOMAINS):
outfiles[dom].close()
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Fix reporting of time intervals in the log mode of XenMon.,
Xen patchbot -unstable <=
|
|
|
|
|