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

Function OpStatCallback

src/sdk/table_impl.cc:138–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void OpStatCallback(Table* table, SdkTask* task) {
139 if (task->Type() == SdkTask::MUTATION) {
140 ((TableImpl*)table)
141 ->StatUserPerfCounter(task->Type(), ((RowMutationImpl*)task)->GetError().GetType(),
142 get_micros() - ((RowMutationImpl*)task)->GetStartTime());
143 } else if (task->Type() == SdkTask::READ) {
144 ((TableImpl*)table)
145 ->StatUserPerfCounter(task->Type(), ((RowReaderImpl*)task)->GetError().GetType(),
146 get_micros() - ((RowReaderImpl*)task)->GetStartTime());
147 } else if (task->Type() == SdkTask::BATCH_MUTATION) {
148 ((TableImpl*)table)
149 ->StatUserPerfCounter(task->Type(), ((BatchMutationImpl*)task)->GetError().GetType(),
150 get_micros() - ((BatchMutationImpl*)task)->GetStartTime());
151 }
152}
153
154void TableImpl::ApplyMutation(RowMutation* row_mu) {
155 perf_counter_.user_mu_cnt.Add(1);

Callers

nothing calls this directly

Calls 6

StatUserPerfCounterMethod · 0.80
get_microsFunction · 0.50
TypeMethod · 0.45
GetTypeMethod · 0.45
GetErrorMethod · 0.45
GetStartTimeMethod · 0.45

Tested by

no test coverage detected