MCPcopy Create free account
hub / github.com/baidu/tera / StatUserPerfCounter

Method StatUserPerfCounter

src/sdk/table_impl.cc:2291–2316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2289}
2290
2291void TableImpl::StatUserPerfCounter(enum SdkTask::TYPE op, ErrorCode::ErrorCodeType code,
2292 int64_t cost_time) {
2293 switch (op) {
2294 case SdkTask::MUTATION:
2295 case SdkTask::BATCH_MUTATION:
2296 if (code == ErrorCode::kOK) {
2297 perf_counter_.user_mu_suc.Inc();
2298 } else {
2299 perf_counter_.user_mu_fail.Inc();
2300 }
2301 perf_counter_.hist_mu_cost.Add(cost_time);
2302 break;
2303 case SdkTask::READ:
2304 if (code == ErrorCode::kOK) {
2305 perf_counter_.user_read_suc.Inc();
2306 } else if (code == ErrorCode::kNotFound) {
2307 perf_counter_.user_read_notfound.Inc();
2308 } else {
2309 perf_counter_.user_read_fail.Inc();
2310 }
2311 perf_counter_.hist_read_cost.Add(cost_time);
2312 break;
2313 default:
2314 break;
2315 }
2316}
2317
2318bool TableImpl::GetTabletLocation(std::vector<TabletInfo>* tablets, ErrorCode* err) {
2319 return false;

Callers 1

OpStatCallbackFunction · 0.80

Calls 2

IncMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected