Changeset: 01645d98a71b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=01645d98a71b Modified Files: clients/mapiclient/Tests/mclient--help.stable.err clients/mapiclient/Tests/mclient--help.stable.err.Windows clients/mapiclient/mclient.1 clients/mapiclient/mclient.c Branch: Mar2018 Log Message:
mclient: make timermode "none" the default (again) as per feature request / bug 6537 diffs (89 lines): diff --git a/clients/mapiclient/Tests/mclient--help.stable.err b/clients/mapiclient/Tests/mclient--help.stable.err --- a/clients/mapiclient/Tests/mclient--help.stable.err +++ b/clients/mapiclient/Tests/mclient--help.stable.err @@ -22,7 +22,7 @@ Options are: -f kind | --format=kind specify output format {csv,tab,raw,sql,xml,trash} -H | --history load/save cmdline history (default off) -i | --interactive interpret `\' commands on stdin - -t | --timer=format use time formatting {clock,performance,none} + -t | --timer=format use time formatting {none,clock,performance} (none is default) -l language | --language=lang {sql,mal} -L logfile | --log=logfile save client/server interaction -s stmt | --statement=stmt run single statement diff --git a/clients/mapiclient/Tests/mclient--help.stable.err.Windows b/clients/mapiclient/Tests/mclient--help.stable.err.Windows --- a/clients/mapiclient/Tests/mclient--help.stable.err.Windows +++ b/clients/mapiclient/Tests/mclient--help.stable.err.Windows @@ -22,7 +22,7 @@ Options are: -f kind | --format=kind specify output format {csv,tab,raw,sql,xml,trash} -H | --history load/save cmdline history (default off) -i | --interactive interpret `\' commands on stdin - -t | --timer=format use time formatting {clock,performance,none} + -t | --timer=format use time formatting {none,clock,performance} (none is default) -l language | --language=lang {sql,mal} -L logfile | --log=logfile save client/server interaction -s stmt | --statement=stmt run single statement diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1 --- a/clients/mapiclient/mclient.1 +++ b/clients/mapiclient/mclient.1 @@ -156,16 +156,10 @@ See the section BACKSLASH COMMANDS below .TP \fB\-\-timer\fP\fB=\fP\fItimermode\fP (\fB\-t\fP \fItimermode\fP) The \fItimer\fP command controls the format of the time reported for queries. -The default mode is \fBclock\fP which reports on the wall-clock time in a human friendly way. -The timer mode \fBnone\fP turns off timing reporting. +The default mode is \fBnone\fP which turns off timing reporting. +The timer mode \fBclock\fP reports the wall-clock time in a human friendly way. The timer mode \fBperformance\fP shows the timing components in millisecond resolution. .br -\fBNote\fP that timermode \fBnone\fP (\fB--timer=none\fP) should be used with formatting options -.B csv, -.B tab, -.B xml, -in order to not have the output(-format) compromized/invalidated by the extra timing output. -.br \fBNote\fP that the client-measured wall-clock time is reported per query \fBonly\fP when options \fB--interactive\fP or \fB--echo\fP are used, because only then does mclient send indivual lines (statements) of the SQL @@ -173,6 +167,12 @@ script to the server. Otherwise, when mc large(r) batch(es), only the total wall-clock time per batch is measured and reported. The server-measured detailed performance timings are alsways measured and reported per query. +.br +\fBNote\fP that timermode \fBnone\fP (\fB--timer=none\fP) should be used with formatting options +.B csv, +.B tab, +.B xml, +in order to not have the output(-format) compromized/invalidated by the extra timing output. .TP \fB\-\-user\fP\fB=\fP\fIuser\fP (\fB\-u\fP \fIuser\fP) Specify the user to connect as. diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -257,7 +257,7 @@ static enum itimers { T_NONE = 0, // don't render the timing information T_CLOCK, // render wallclock time in human readable format T_PERF // return detailed performance -} timermode = T_CLOCK; +} timermode = T_NONE; static int timerHumanCalled = 0; static void @@ -2213,7 +2213,7 @@ showCommands(void) mnstr_printf(toConsole, "\\a - disable auto commit\n"); } mnstr_printf(toConsole, "\\e - echo the query in sql formatting mode\n"); - mnstr_printf(toConsole, "\\t - set the timer {clock,performance,none}\n"); + mnstr_printf(toConsole, "\\t - set the timer {none,clock,performance} (none is default)\n"); mnstr_printf(toConsole, "\\f - format using a built-in renderer {csv,tab,raw,sql,xml,trash}\n"); mnstr_printf(toConsole, "\\w# - set maximal page width (-1=unlimited, 0=terminal width, >0=limit to num)\n"); mnstr_printf(toConsole, "\\r# - set maximum rows per page (-1=raw)\n"); @@ -2999,7 +2999,7 @@ usage(const char *prog, int xit) fprintf(stderr, " -f kind | --format=kind specify output format {csv,tab,raw,sql,xml,trash}\n"); fprintf(stderr, " -H | --history load/save cmdline history (default off)\n"); fprintf(stderr, " -i | --interactive interpret `\\' commands on stdin\n"); - fprintf(stderr, " -t | --timer=format use time formatting {clock,performance,none}\n"); + fprintf(stderr, " -t | --timer=format use time formatting {none,clock,performance} (none is default)\n"); fprintf(stderr, " -l language | --language=lang {sql,mal}\n"); fprintf(stderr, " -L logfile | --log=logfile save client/server interaction\n"); fprintf(stderr, " -s stmt | --statement=stmt run single statement\n"); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list