Commit cff73a85 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 502a9a0d
...@@ -99,24 +99,35 @@ Three ways particularly are well-understood and handy: ...@@ -99,24 +99,35 @@ Three ways particularly are well-understood and handy:
- profiling - profiling
- synchronous tracing - synchronous tracing
Recording events stream Recording events stream
TODO To get better understanding of what happens when it is possible to record
events into a stream and later either visualize or postprocess them.
This is similar to how Go execution tracer works:
https://golang.org/s/go15trace
https://golang.org/pkg/runtime/trace
https://golang.org/cmd/trace
though there it records only predefined set of events related to Go runtime.
TODO tracing should provide infrastructure to write events out in format
understood by chromium trace-viewer: https://github.com/catapult-project/catapult/tree/master/tracing
Profiling Profiling
A profile is (TODO aggregate summary of) a collection of stack traces showing the call sequences that led A profile is aggregate summary of collection of stack traces showing the call sequences that led
to instances of a particular event. One could create runtime/pprof.Profile and to instances of a particular event. One could create runtime/pprof.Profile and
use Profile.Add in a probe attached to particular trace event. The profile can use Profile.Add in a probe attached to particular trace event. The profile can
be later analyzed and visualised with go pprof tool. be later analyzed and visualised with Profile.WriteTo and `go tool pprof`.
Please refer to runtime/pprof package documentation for details. Please refer to runtime/pprof package documentation for details.
XXX Profile.Add needs unique value for each invocation - how do we do? XXX Profile.Add needs unique value for each invocation - how do we do? Provide NaN every time?
XXX BUG not working? XXX should tracing provide more tight integration with runtime/pprof.Profile?
BUG(kirr): should tracing provide more tight integration with runtime/pprof.Profile?
Synchronous tracing Synchronous tracing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment