1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-07 12:02:30 +03:00
Files
postgres/src/test/bench/perquery
1996-07-09 06:22:35 +00:00

13 lines
379 B
Bash

#!/bin/sh
egrep 'x = "|elapse' > /tmp/foo$$
awk 'BEGIN { x = 0; y = 0; z = 0; a = 0; } \
/.*elapse.*/ {x = $2 + x; y = $4 + y; z = $6 + z;} \
/.*x = ".*/ { \
printf "query %2d: %7.3f real %7.3f user %7.3f sys\n", a, x, y, z; \
x = 0; y = 0; z = 0; a = a + 1; } \
END {printf("query %2d: %7.3f real %7.3f user %7.3f sys\n", a, x, y, z);}' \
< /tmp/foo$$