Unfortunately I don't think there is a way to get the times into redirected 
output automatically. It looks like the callback that handles the redirected 
output runs completely before the endTimer function runs, which does a straight 
up printf right there in the endTimer function with no knowledge of any main 
output redirection.

So it looks like recording times is done via copying off the console screen 
only. Or I suppose I should say that it would have to be done outside of the 
CLI to capture its output, be that copy/paste or something more fancy.



-----Original Message-----
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of MONSTRUO Hugo González
Sent: Tuesday, January 03, 2017 3:35 PM
To: sqlite-users@mailinglists.sqlite.org
Subject: [sqlite] SQlite shell tool

What are the orders to get the following text ?

I tried with:
.once prueba.txt
.output prueba.txt
.log prueba.txt
.timer ON
.echo ON
PRAGMA integrity_check;
...

but I did not get the lines "Run Time..." into de file

SQLite version 3.14.0 2016-07-26 15:17:14
Enter ".help" for usage hints.
sqlite> .timer ON
sqlite> PRAGMA integrity_check;
ok
Run Time: real 11.962 user 9.205414 sys 2.752183
sqlite> SELECT COUNT (*) FROM bm_ppal;
724816
Run Time: real 0.016 user 0.005380 sys 0.009552
sqlite> SELECT COUNT (*) FROM bm_ppal ORDER BY nbmId;
724816
Run Time: real 0.016 user 0.005368 sys 0.009806
sqlite> SELECT COUNT (nbmId) FROM bm_ppal ORDER BY nbmId;
724816
Run Time: real 0.058 user 0.046052 sys 0.010368
sqlite>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to