Fixes for profiling

pull/4188/head
Craig Tiller 9 years ago
parent 0927c70180
commit 07718b8e2f
  1. 2
      src/core/transport/metadata.c

@ -430,6 +430,7 @@ grpc_mdstr *grpc_mdstr_from_buffer(const gpr_uint8 *buf, size_t length) {
if (ss == NULL) break; if (ss == NULL) break;
if (ss->hash == hash && GPR_SLICE_LENGTH(ss->slice) == length && if (ss->hash == hash && GPR_SLICE_LENGTH(ss->slice) == length &&
0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length)) { 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length)) {
GPR_TIMER_END("grpc_mdstr_from_buffer", 0);
return ss; return ss;
} }
} }
@ -575,6 +576,7 @@ grpc_mdelem *grpc_mdelem_from_metadata_strings(grpc_mdstr *mkey,
smd = g_static_mdtab[idx]; smd = g_static_mdtab[idx];
if (smd == NULL) break; if (smd == NULL) break;
if (smd->key == mkey && smd->value == mvalue) { if (smd->key == mkey && smd->value == mvalue) {
GPR_TIMER_END("grpc_mdelem_from_metadata_strings", 0);
return smd; return smd;
} }
} }

Loading…
Cancel
Save