Lines Matching refs:stats
94 struct bch2_time_stats stats;
98 static inline struct quantiles *time_stats_to_quantiles(struct bch2_time_stats *stats)
100 return stats->have_quantiles
101 ? &container_of(stats, struct bch2_time_stats_quantiles, stats)->quantiles
106 void __bch2_time_stats_update(struct bch2_time_stats *stats, u64, u64);
111 * @stats - bch2_time_stats to update
116 static inline void bch2_time_stats_update(struct bch2_time_stats *stats, u64 start)
118 __bch2_time_stats_update(stats, start, local_clock());
124 * @stats - bch2_time_stats to update
127 * Use this when tracking time stats for state changes, i.e. resource X becoming
130 static inline bool track_event_change(struct bch2_time_stats *stats, bool v)
132 if (v != !!stats->last_event_start) {
134 bch2_time_stats_update(stats, stats->last_event_start);
135 stats->last_event_start = 0;
137 stats->last_event_start = local_clock() ?: 1;
150 bch2_time_stats_exit(&statq->stats);
154 bch2_time_stats_init(&statq->stats);
155 statq->stats.have_quantiles = true;