Index: base/test/trace_event_analyzer.h |
diff --git a/base/test/trace_event_analyzer.h b/base/test/trace_event_analyzer.h |
index 05a008e72a542463d0e674dd7e2f46a01893245a..df46839a54e190b8a1fd7b3ce9ca92c083f9477b 100644 |
--- a/base/test/trace_event_analyzer.h |
+++ b/base/test/trace_event_analyzer.h |
@@ -553,9 +553,21 @@ struct RateStats { |
double standard_deviation_us; |
}; |
+struct RateStatsOptions { |
+ RateStatsOptions() : trim_min(0u), trim_max(0u) {} |
+ // After the times between events are sorted, the number of specified elements |
+ // will be trimmed before calculating the RateStats. This is useful in cases |
+ // where extreme outliers are tolerable and should not skew the overall |
+ // average. |
+ size_t trim_min; // Trim this many minimum times. |
+ size_t trim_max; // Trim this many maximum times. |
+}; |
+ |
// Calculate min/max/mean and standard deviation from the times between |
// adjacent events. |
-bool GetRateStats(const TraceEventVector& events, RateStats* stats); |
+bool GetRateStats(const TraceEventVector& events, |
+ RateStats* stats, |
+ const RateStatsOptions* options); |
// Starting from |position|, find the first event that matches |query|. |
// Returns true if found, false otherwise. |