Skip to content

tenzr::profiler::ProfileSummary

Aggregated profile statistics for a recorded trace.

#include <trace.h>

Public Functions

Name
std::string FormatReport() const
BottleneckReport IdentifyBottlenecks() const
bool CheckLatencyRegression(int64_t baseline_us, double threshold_pct =10.0, std::string * message =nullptr) const

Public Attributes

Name
int64_t total_duration_us
Total trace duration.
size_t total_events
std::unordered_map< std::string, int64_t > category_durations_us
std::vector< TopOp > top_ops

Public Functions Documentation

function FormatReport

std::string FormatReport() const

Return:

  • Formatted summary report.
  • Formatted report text.

Render the summary category breakdown, top operations, and stall diagnostics.

function IdentifyBottlenecks

BottleneckReport IdentifyBottlenecks() const

Return:

  • Heuristic bottleneck analysis.
  • Bottleneck report including recommendations.

Classify the dominant cost as compute, transfer, communication, or host dispatch bound.

function CheckLatencyRegression

bool CheckLatencyRegression(
    int64_t baseline_us,
    double threshold_pct =10.0,
    std::string * message =nullptr
) const

Parameters:

  • baseline_us Baseline duration in microseconds.
  • threshold_pct Allowed percentage increase.
  • message Optional output describing the regression.
  • baseline_us Baseline duration in microseconds.
  • threshold_pct Allowed percentage increase.
  • message Optional out-parameter receiving a diagnostic message.

Return:

  • true when the regression exceeds threshold_pct.
  • true when a regression is detected.

Compare total duration against a baseline. Compare total duration against a baseline and flag a regression beyond threshold_pct.

Public Attributes Documentation

variable total_duration_us

int64_t total_duration_us {0};

Total trace duration.

variable total_events

size_t total_events {0};

variable category_durations_us

std::unordered_map< std::string, int64_t > category_durations_us;

variable top_ops

std::vector< TopOp > top_ops;