File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -13774,15 +13774,27 @@ int BlueStore::omap_iterate(
1377413774 {
1377513775 std::string key;
1377613776 o->get_omap_key(start_from.seek_position, &key);
13777+ auto start = ceph::mono_clock::now();
1377713778 if (start_from.seek_type == omap_iter_seek_t::LOWER_BOUND) {
1377813779 it->lower_bound(key);
13780+ c->store->log_latency(
13781+ __func__,
13782+ l_bluestore_omap_lower_bound_lat,
13783+ ceph::mono_clock::now() - start,
13784+ c->store->cct->_conf->bluestore_log_omap_iterator_age);
1377913785 } else {
1378013786 it->upper_bound(key);
13787+ c->store->log_latency(
13788+ __func__,
13789+ l_bluestore_omap_upper_bound_lat,
13790+ ceph::mono_clock::now() - start,
13791+ c->store->cct->_conf->bluestore_log_omap_iterator_age);
1378113792 }
1378213793 }
1378313794
1378413795 // iterate!
1378513796 std::string tail;
13797+ ceph::timespan next_lat_acc{0};
1378613798 o->get_omap_tail(&tail);
1378713799 while (it->valid()) {
1378813800 std::string user_key;
@@ -13795,12 +13807,17 @@ int BlueStore::omap_iterate(
1379513807 if (ret == omap_iter_ret_t::STOP) {
1379613808 break;
1379713809 } else if (ret == omap_iter_ret_t::NEXT) {
13810+ ceph::time_guard<ceph::mono_clock>{next_lat_acc};
1379813811 it->next();
1379913812 } else {
1380013813 ceph_abort();
1380113814 }
1380213815 }
13803-
13816+ c->store->log_latency(
13817+ __func__,
13818+ l_bluestore_omap_next_lat,
13819+ next_lat_acc,
13820+ c->store->cct->_conf->bluestore_log_omap_iterator_age);
1380413821 return 0;
1380513822}
1380613823
You can’t perform that action at this time.
0 commit comments