Fix benchmark names of the IOVec variants. Little oopsie in naming; the argument was already included in the name. Bug: 542671322 Change-Id: Idb3c9022b488e0892491c48cc5146c6d6a6a6964 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/100747 Commit-Queue: Rudolf Polzer <rpolzer@google.com> Reviewed-by: Xiangfei Ding <xfding@google.com> Commit-Queue: Xiangfei Ding <xfding@google.com> Auto-Submit: Rudolf Polzer <rpolzer@google.com>
diff --git a/bench/aead.cc b/bench/aead.cc index bbdfaed..e2d9a99 100644 --- a/bench/aead.cc +++ b/bench/aead.cc
@@ -263,8 +263,12 @@ void SetInputLengthv(benchmark::Benchmark *bench) { // No need to distinguish by name - the IOVec related args suffice to - // distinguish them. - bench->Name("BM_SpeedAEAD"); + // distinguish them. This allows later making BM_SpeedAEADv the only one, + // while renaming it to BM_SpeedAEAD. + const std::string prefix = "BM_SpeedAEADv/"; + BSSL_CHECK(std::string(bench->GetName()).substr(0, prefix.size()) == prefix); + bench->Name(std::string("BM_SpeedAEAD/") + + std::string(bench->GetName()).substr(prefix.size())); bench->ArgNames({"InputSize", "IOVecFirst", "IOVecOthers"}); auto input_sizes = bench::GetInputSizes(bench);