@@ -457,18 +457,6 @@ void BlueFS::_init_logger()
457457 " Average allocation latency for primary/shared device" ,
458458 " bsal" ,
459459 PerfCountersBuilder::PRIO_USEFUL);
460- b.add_time (l_bluefs_wal_alloc_max_lat, " alloc_wal_max_lat" ,
461- " Max allocation latency for wal device" ,
462- " awxt" ,
463- PerfCountersBuilder::PRIO_INTERESTING);
464- b.add_time (l_bluefs_db_alloc_max_lat, " alloc_db_max_lat" ,
465- " Max allocation latency for db device" ,
466- " adxt" ,
467- PerfCountersBuilder::PRIO_INTERESTING);
468- b.add_time (l_bluefs_slow_alloc_max_lat, " alloc_slow_max_lat" ,
469- " Max allocation latency for primary/shared device" ,
470- " asxt" ,
471- PerfCountersBuilder::PRIO_INTERESTING);
472460
473461 logger = b.create_perf_counters ();
474462 cct->get_perfcounters_collection ()->add (logger);
@@ -4355,25 +4343,13 @@ void BlueFS::_update_allocate_stats(uint8_t id, const ceph::timespan& d)
43554343{
43564344 switch (id) {
43574345 case BDEV_SLOW:
4358- logger->tinc (l_bluefs_slow_alloc_lat, d);
4359- if (d > max_alloc_lat[id]) {
4360- logger->tset (l_bluefs_slow_alloc_max_lat, utime_t (d));
4361- max_alloc_lat[id] = d;
4362- }
4346+ logger->tinc_with_max (l_bluefs_slow_alloc_lat, d);
43634347 break ;
43644348 case BDEV_DB:
4365- logger->tinc (l_bluefs_db_alloc_lat, d);
4366- if (d > max_alloc_lat[id]) {
4367- logger->tset (l_bluefs_db_alloc_max_lat, utime_t (d));
4368- max_alloc_lat[id] = d;
4369- }
4349+ logger->tinc_with_max (l_bluefs_db_alloc_lat, d);
43704350 break ;
43714351 case BDEV_WAL:
4372- logger->tinc (l_bluefs_wal_alloc_lat, d);
4373- if (d > max_alloc_lat[id]) {
4374- logger->tset (l_bluefs_wal_alloc_max_lat, utime_t (d));
4375- max_alloc_lat[id] = d;
4376- }
4352+ logger->tinc_with_max (l_bluefs_wal_alloc_lat, d);
43774353 break ;
43784354 }
43794355}
0 commit comments