Commit Graph

6 Commits

Author SHA1 Message Date
David Garcia Quintas 9b0a94b5c7 Further fixes and eye candy.
In particular, fixed the handling of } when nesting gets complex.
Made the reporting of block percentiles consistent with the ! reporting.
2015-05-06 20:50:49 -07:00
David Garcia Quintas 7cff3ee205 Handling of ! tags across threads & performance.
Fixed an important bug whereby thread info wasn't being taken into
account for ! marks.

Also dramatically improved performance by getting rid of a silly O(n^2)
loop.
2015-05-06 17:11:54 -07:00
David Garcia Quintas 975efdc915 Avoid repeated sortings in percentile() calls.
Have the function expect sorted input.
2015-05-06 14:42:46 -07:00
David Garcia Quintas 776075a80a Implemented aggregation over important mark times.
Namely, 50,90,95 and 99th percentiles are now reported on important marks.

Example output (for a single ! mark between begin-end marks in grpc_tcp_write()):

```
Important marks:
================
99999@src/core/iomgr/tcp_posix.c:545
                           Relative mark:         50th p.         90th p.         95th p.         99th p.
  205 { (src/core/iomgr/tcp_posix.c:541):           0.037           0.057           0.070           0.087
  205 } (src/core/iomgr/tcp_posix.c:556):          15.181          27.021          32.509          41.103

```

For a fabricated example (see https://gist.github.com/dgquintas/026d333815589cc37269) with the same ! mark
in two different frames, the output is:

```
Important marks:
================
999999@src/core/iomgr/tcp_posix.c:5
                           Relative mark:         50th p.         90th p.         95th p.         99th p.
    205 { (src/core/iomgr/tcp_posix.c:1):           9.500          13.900          14.450          14.890
    205 } (src/core/iomgr/tcp_posix.c:6):           3.000           4.600           4.800           4.960

999999@src/core/iomgr/tcp_posix.c:3
                           Relative mark:         50th p.         90th p.         95th p.         99th p.
    205 { (src/core/iomgr/tcp_posix.c:1):           2.500           2.900           2.950           2.990
    205 { (src/core/iomgr/tcp_posix.c:2):           1.500           1.900           1.950           1.990
    205 } (src/core/iomgr/tcp_posix.c:4):           2.000           2.800           2.900           2.980
    205 } (src/core/iomgr/tcp_posix.c:6):          10.000          15.600          16.300          16.860

```
2015-05-06 14:26:17 -07:00
David Garcia Quintas 5b2ea2979b Added support for important mark (!) analysis.
For example, an input of
GRPC_LAT_PROF 1316908107613.015869 0x7fd35f7fe700 { 205 (nil)
src/core/iomgr/tcp_posix.c 1
GRPC_LAT_PROF 1316908107614.015869 0x7fd35f7fe700 { 205 (nil)
src/core/iomgr/tcp_posix.c 2
GRPC_LAT_PROF 1316908107615.015869 0x7fd35f7fe700 ! 999999 (nil)
src/core/iomgr/tcp_posix.c 3
GRPC_LAT_PROF 1316908107616.015869 0x7fd35f7fe700 } 205 (nil)
src/core/iomgr/tcp_posix.c 4
GRPC_LAT_PROF 1316908107617.015869 0x7fd35f7fe700 ! 999999 (nil)
src/core/iomgr/tcp_posix.c 5
GRPC_LAT_PROF 1316908107618.015869 0x7fd35f7fe700 } 205 (nil)
src/core/iomgr/tcp_posix.c 6

results in

tag 50%/90%/95%/99% us
205 5.00/5.00/5.00/5.00

Important marks:
================
999999 @ src/core/iomgr/tcp_posix.c:3
205 { (src/core/iomgr/tcp_posix.c:1):        2.000 us
205 { (src/core/iomgr/tcp_posix.c:2):        1.000 us
205 } (src/core/iomgr/tcp_posix.c:4):       -1.000 us
205 } (src/core/iomgr/tcp_posix.c:6):       -3.000 us

999999 @ src/core/iomgr/tcp_posix.c:5
205 { (src/core/iomgr/tcp_posix.c:1):        4.000 us
205 } (src/core/iomgr/tcp_posix.c:6):       -1.000 us
2015-05-06 10:15:36 -07:00
Craig Tiller bd9f924f16 Basic profiler analyzer 2015-05-05 12:29:12 -07:00