mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
24 lines
500 B
D
24 lines
500 B
D
|
#!/usr/sbin/dtrace -s
|
||
|
#
|
||
|
# Shows time take to actually parse the query statement
|
||
|
|
||
|
#pragma D option quiet
|
||
|
|
||
|
mysql*:::query-parse-start
|
||
|
{
|
||
|
self->parsestart = timestamp;
|
||
|
self->parsequery = copyinstr(arg0);
|
||
|
}
|
||
|
|
||
|
mysql*:::query-parse-done
|
||
|
/arg0 == 0/
|
||
|
{
|
||
|
printf("Parsing %s: %d microseconds\n", self->parsequery,((timestamp - self->parsestart)/1000));
|
||
|
}
|
||
|
|
||
|
mysql*:::query-parse-done
|
||
|
/arg0 != 0/
|
||
|
{
|
||
|
printf("Error parsing %s: %d microseconds\n", self->parsequery,((timestamp - self->parsestart)/1000));
|
||
|
}
|