Basic parsing tests

pull/9849/head
Craig Tiller 8 years ago
parent 29dd982487
commit 5cd989e95a
  1. 14
      test/cpp/microbenchmarks/bm_chttp2.cc

@ -279,12 +279,24 @@ class IndexedSingleStaticElem {
{0x40, 0x07, ':', 's', 't', 'a', 't', 'u', 's', 0x03, '2', '0', '0'})};
}
static std::vector<grpc_slice> GetBenchmarkSlices() {
return {MakeSlice({0xbf})};
return {MakeSlice({0xbe})};
}
};
class IndexedSingleInternedElem {
public:
static std::vector<grpc_slice> GetInitSlices() {
return {MakeSlice(
{0x40, 0x03, 'a', 'b', 'c', 0x03, 'd', 'e', 'f'})};
}
static std::vector<grpc_slice> GetBenchmarkSlices() {
return {MakeSlice({0xbe})};
}
};
BENCHMARK_TEMPLATE(BM_HpackParserParseHeader, EmptyBatch);
BENCHMARK_TEMPLATE(BM_HpackParserParseHeader, IndexedSingleStaticElem);
BENCHMARK_TEMPLATE(BM_HpackParserParseHeader, IndexedSingleInternedElem);
} // namespace hpack_parser_fixtures

Loading…
Cancel
Save