Changeset: 2fafd264bb48 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2fafd264bb48
Modified Files:
        clients/mapiclient/mclient.c
Branch: Mar2018
Log Message:

mclient: extended human-readable rendering of wall-clock time


diffs (26 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -275,7 +275,7 @@ timerHuman(int64_t sqloptimizer, int64_t
         */
 
        if (timermode == T_CLOCK && (!singleinstr != !total)) { /* (singleinstr 
XOR total) */
-               if (t / 1000 < 950) {
+               if (t / 1000 < 1000) {
                        mnstr_printf(toConsole, "clk: %" PRId64 ".%03d ms\n", t 
/ 1000, (int) (t % 1000));
                        return;
                }
@@ -285,7 +285,12 @@ timerHuman(int64_t sqloptimizer, int64_t
                        return;
                }
                t /= 1000;
-               mnstr_printf(toConsole, "clk: %" PRId64 ":%02d min\n", t / 60, 
(int) (t % 60));
+               if (t / 1000 < 60) {
+                       mnstr_printf(toConsole, "clk: %" PRId64 ":%02d min\n", 
t / 60, (int) (t % 60));
+                       return;
+               }
+               t /= 60;
+               mnstr_printf(toConsole, "clk: %" PRId64 ":%02d h\n", t / 60, 
(int) (t % 60));
                return;
        }
        /* for performance measures we use milliseconds as the base */
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to