From 5cd989e95a766e1119a7d333fda197e6a563d6a6 Mon Sep 17 00:00:00 2001 From: Craig Tiller <ctiller@google.com> Date: Wed, 22 Feb 2017 17:08:00 -0800 Subject: [PATCH] Basic parsing tests --- test/cpp/microbenchmarks/bm_chttp2.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/cpp/microbenchmarks/bm_chttp2.cc b/test/cpp/microbenchmarks/bm_chttp2.cc index 5ec517aaf3..fa3d84cf80 100644 --- a/test/cpp/microbenchmarks/bm_chttp2.cc +++ b/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 -- GitLab