Changeset: dde14c8266b5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dde14c8266b5
Modified Files:
        clients/mapiclient/tomograph.c
Branch: Feb2013
Log Message:

make tomograph work also across midnight

Still limited to < 24 h per run.
Breaking the 24 h wall requires more information,
i.e., absolute instead of relative timestamps,
from the MAL profiler.


diffs (24 lines):

diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -1576,8 +1576,19 @@ static void update(int state, int thread
                return;
        }
 
-       assert(clkticks - starttime >= 0);
+       assert(clkticks >= 0);
        clkticks -= starttime;
+       if (clkticks < 0) {
+               /* HACK: *TRY TO* compensate for the fact that the MAL
+                * profiler chops-off day information, and assume that
+                * clkticks is < starttime because the tomograph run
+                * crossed a day boundary (midnight);
+                * we simply add 1 day (24 hours) worth of microseconds.
+                * NOTE: this surely does NOT work correctly if the
+                * tomograph run takes 24 hours or more ...
+                */
+               clkticks += US_DD;
+       }
 
        /* handle a ping event, keep the current instruction in focus */
        if (state >= PING) {
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to