X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=print_latency.h;h=d80ac88e96a25ac04f6f64a27f921edd9c45ff59;hp=1c937c58856a7cb2a511e7856ebbf1c51fc87c24;hb=9e47a2f661b9d292598ef0277e507458e3dad62f;hpb=1df7849fad1d0647a02951abaa60f9e4f40ce360 diff --git a/print_latency.h b/print_latency.h index 1c937c5..d80ac88 100644 --- a/print_latency.h +++ b/print_latency.h @@ -13,21 +13,20 @@ #include "metrics.h" // Since every output frame is based on multiple input frames, we need -// more than one start timestamp. For now, we keep just the smallest -// and largest timestamp, so that we can print out a range. -// For both of these, steady_clock::time_point::min() is used for “not set”. +// more than one start timestamp; one for each input. +// For all of these, steady_clock::time_point::min() is used for “not set”. struct ReceivedTimestamps { - std::chrono::steady_clock::time_point min_ts, max_ts; + std::vector ts; }; struct LatencyHistogram { void init(const std::string &measuring_point); // Initializes histograms and registers them in global_metrics. - Histogram histogram_lowest_latency_input, histogram_highest_latency_input; - Histogram histogram_lowest_latency_input_bframe, histogram_highest_latency_input_bframe; + // Indices: card number, frame history number, b-frame or not (1/0, where 2 counts both). + std::vector>> summaries; }; ReceivedTimestamps find_received_timestamp(const std::vector &input_frames); -void print_latency(const std::string &header, const ReceivedTimestamps &received_ts, bool is_b_frame, int *frameno, LatencyHistogram *histogram); +void print_latency(const char *header, const ReceivedTimestamps &received_ts, bool is_b_frame, int *frameno, LatencyHistogram *histogram); #endif // !defined(_PRINT_LATENCY_H)