When the number of warned ops reaches the log threshold, should break
out of the outer for loop as well.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
int slow = 0; // total slow
int warned = 0; // total logged
- for (uint32_t iter = 0; iter < num_optracker_shards; iter++) {
+ for (uint32_t iter = 0;
+ iter < num_optracker_shards && warned < log_threshold; iter++) {
ShardedTrackingData* sdata = sharded_in_flight_list[iter];
assert(NULL != sdata);
Mutex::Locker locker(sdata->ops_in_flight_lock_sharded);