EXPAND ALL
- Home
- About Pixie
- Installing Pixie
- Using Pixie
- Tutorials
- Reference
Converts perf profiling stack traces into pprof format.
A single row that aggregates all the stack traces and counts into pprof format.
Variable | Type | Description |
---|---|---|
stack_trace | STRING | Stack trace string. |
count | INT64 | Count of the stack trace string. |
profiler_period_ms | INT64 | Profiler stack trace sampling period in ms. |
# Get the stack traces, the underlying data we want; populate an ASID column# to join with profiler sampling period (see next).stack_traces = px.DataFrame(table='stack_traces.beta', start_time='-1m')stack_traces.asid = px.asid()| # Get the profiler sampling period for all deployed PEMs, then merge to stack traces on ASID.sample_period = px.GetProfilerSamplingPeriodMS()df = stack_traces.merge(sample_period, how='inner', left_on=['asid'], right_on=['asid'])| # The pprof UDA requires that each underlying dataset have the same sampling period.# Thus, group by sampling period (normally this results in just one group).df = df.groupby(['profiler_sampling_period_ms']).agg(pprof=('stack_trace', 'count', 'profiler_sampling_period_ms', px.pprof))