std::unique_ptr<RGWGetObj_Filter> run_lua;
map<string, bufferlist>::iterator attr_iter;
std::string labels;
+ bool rgw_perf_counters_cache;
perfcounter->inc(l_rgw_get);
return;
}
- labels = ceph::perf_counters::cache_key("z_rgw", {{"Bucket", s->bucket_name}, {"User", s->user->get_display_name()}});
- // TODO delete logging
- ldpp_dout(this, 20) << "labels for perf counters cache for l_rgw_metrics_get_b: " << labels << dendl;
- perf_counters_cache->add(labels);
- perf_counters_cache->inc(labels, l_rgw_get_b, s->obj_size);
+ rgw_perf_counters_cache = s->cct->_conf.get_val<bool>("rgw_perf_counters_cache");
+ if(rgw_perf_counters_cache) {
+ labels = ceph::perf_counters::cache_key("z_rgw", {{"Bucket", s->bucket_name}, {"User", s->user->get_display_name()}});
+ // TODO delete logging
+ ldpp_dout(this, 20) << "labels for perf counters cache for l_rgw_metrics_get_b: " << labels << dendl;
+ perf_counters_cache->add(labels);
+ perf_counters_cache->inc(labels, l_rgw_get_b, s->obj_size);
+ }
perfcounter->inc(l_rgw_get_b, end - ofs);
op_ret = filter->flush();
perfcounter->tinc(l_rgw_get_lat, s->time_elapsed());
- perf_counters_cache->tinc(labels, l_rgw_get_lat, s->time_elapsed());
+
+ if(rgw_perf_counters_cache) {
+ perf_counters_cache->tinc(labels, l_rgw_get_lat, s->time_elapsed());
+ }
+
if (op_ret < 0) {
goto done_err;
}
off_t fst;
off_t lst;
+ bool rgw_perf_counters_cache = s->cct->_conf.get_val<bool>("rgw_perf_counters_cache");
std::string labels = ceph::perf_counters::cache_key("z_rgw", {{"Bucket", s->bucket_name}, {"User", s->user->get_display_name()}});
- // TODO delete below logging
- ldpp_dout(this, 20) << "labels for perf counters cache for l_rgw_metrics_put_b: " << labels << dendl;
- uint64_t target_size = s->cct->_conf.get_val<uint64_t>("labeled_perfcounters_cache_size");
- bool eviction = s->cct->_conf.get_val<bool>("labeled_perfcounters_cache_eviction");
- ldpp_dout(this, 20) << "target size for perf counters cache is: " << target_size << " eviction is: " << eviction << dendl;
+ if(rgw_perf_counters_cache) {
+ // TODO delete below logging
+ ldpp_dout(this, 20) << "labels for perf counters cache for l_rgw_metrics_put_b: " << labels << dendl;
+ uint64_t target_size = s->cct->_conf.get_val<uint64_t>("labeled_perfcounters_cache_size");
+ bool eviction = s->cct->_conf.get_val<bool>("labeled_perfcounters_cache_eviction");
+ ldpp_dout(this, 20) << "target size for perf counters cache is: " << target_size << " eviction is: " << eviction << dendl;
- perf_counters_cache->add(labels);
+ perf_counters_cache->add(labels);
+ }
bool need_calc_md5 = (dlo_manifest == NULL) && (slo_info == NULL);
perfcounter->inc(l_rgw_put);
auto put_lat = make_scope_guard([&] {
perfcounter->tinc(l_rgw_put_lat, s->time_elapsed());
perf_counters_cache->tinc(labels, l_rgw_put_lat, s->time_elapsed());
+ //if(rgw_perf_counters_cache) {
+ //}
});
op_ret = -EINVAL;
s->obj_size = ofs;
s->object->set_obj_size(ofs);
- perf_counters_cache->inc(labels, l_rgw_put_b, s->obj_size);
+ rgw_perf_counters_cache = s->cct->_conf.get_val<bool>("rgw_perf_counters_cache");
+ if(rgw_perf_counters_cache) {
+ perf_counters_cache->inc(labels, l_rgw_put_b, s->obj_size);
+ }
perfcounter->inc(l_rgw_put_b, s->obj_size);