stethoscope not redirecting time column correctly
Hi, When setting stethoscope dumping to disk by `stethoscope -d <db-name> -o <output-file>`, the time column is printed in the console instead of the file. In `MonetDB/clients/mapiclient/stethoscope.c` L113, it directly prints to stdout by `printf("\"%s\", ", ev->time);`. Is it on purpose? Also, I can't follow this message[1] to profile MAL because it seems that the APIs have been changed. Where can I find the newest document? Thanks, Jiading Guo [1]: https://www.monetdb.org/pipermail/users-list/2013-May/006369.html
Hi, This indeed seems to be a bug. I will submit a patch later today. In the meantime, I suggest you look into the -j option of stethosope. This produces JSON objects that contain more information about each MAL instruction. Actually by default the profiler now produces these JSON objects. In order to access the profiler programmatically you can use: profiler.setheartbeat(<frequency>); profiler.openstream(<mode>); [...] profiler.stop(); The first instruction sets up the profiler heartbeat frequency. For instance profiler.setheartbeat(50); will instruct the profiler to produce one heartbeat JSON object (containing CPU and memory load information from the OS) every 50 milliseconds. If you are not interested in heartbeats set this to 0. <mode> should be an integer. If (<mode> & 1) == 1 the profiler will print information about in progress instruction upon the client startup and if (<mode> & 2) == 1 the profiler will produce pretty printed JSON objects. If you absolutely need the old, line based format instead of the JSON objects, take a look at the function convertOldFormat at stethoscope.c L138 on the default branch. I hope this helps, Panos. On 9/17/19 10:43 AM, Jiading Guo wrote:
Hi,
When setting stethoscope dumping to disk by `stethoscope -d <db-name> -o <output-file>`, the time column is printed in the console instead of the file.
In `MonetDB/clients/mapiclient/stethoscope.c` L113, it directly prints to stdout by `printf("\"%s\", ", ev->time);`. Is it on purpose?
Also, I can't follow this message[1] to profile MAL because it seems that the APIs have been changed. Where can I find the newest document?
Thanks, Jiading Guo
[1]: https://www.monetdb.org/pipermail/users-list/2013-May/006369.html _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
On 9/17/19 11:29 AM, Panagiotis Koutsourakis wrote:
Hi,
This indeed seems to be a bug. I will submit a patch later today.
In the meantime, I suggest you look into the -j option of stethosope. This produces JSON objects that contain more information about each MAL instruction. Actually by default the profiler now produces these JSON objects.
In order to access the profiler programmatically you can use:
profiler.setheartbeat(<frequency>); profiler.openstream(<mode>); [...] profiler.stop();
The first instruction sets up the profiler heartbeat frequency. For instance profiler.setheartbeat(50); will instruct the profiler to produce one heartbeat JSON object (containing CPU and memory load information from the OS) every 50 milliseconds. If you are not interested in heartbeats set this to 0.
<mode> should be an integer. If (<mode> & 1) == 1 the profiler will print information about in progress instruction upon the client startup and if (<mode> & 2) == 1 the profiler will produce pretty printed JSON objects.
If you absolutely need the old, line based format instead of the JSON objects, take a look at the function convertOldFormat at stethoscope.c L138 on the default branch.
Sorry a small mistake here: the function you should be looking is keyvalueparser at the file clients/mapiclient/eventparser.c line 176 on the default branch.
I hope this helps, Panos.
On 9/17/19 10:43 AM, Jiading Guo wrote:
Hi,
When setting stethoscope dumping to disk by `stethoscope -d <db-name> -o <output-file>`, the time column is printed in the console instead of the file.
In `MonetDB/clients/mapiclient/stethoscope.c` L113, it directly prints to stdout by `printf("\"%s\", ", ev->time);`. Is it on purpose?
Also, I can't follow this message[1] to profile MAL because it seems that the APIs have been changed. Where can I find the newest document?
Thanks, Jiading Guo
[1]: https://www.monetdb.org/pipermail/users-list/2013-May/006369.html _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
participants (2)
-
Jiading Guo
-
Panagiotis Koutsourakis