EXPAND ALL
  • Home

pprof

Converts perf profiling stack traces into pprof format.

Returns: STRING

A single row that aggregates all the stack traces and counts into pprof format.

Arguments

VariableTypeDescription
stack_traceSTRINGStack trace string.
countINT64Count of the stack trace string.
profiler_period_msINT64Profiler stack trace sampling period in ms.

Examples:

# 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))
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.