mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Switch benchmarks to match unit test namespacing. (#3268)
Specifically, rather than nesting them in `Carbon::Testing`, nest them in `Carbon::Foo` for whatever component they're benchmarking. All our current benchmarks are lexer benchmarks so its `Carbon::Lex`. This makes even more sense for benchmarks than unittests I think.
This commit is contained in:
@@ -7,11 +7,9 @@
|
||||
#include "toolchain/diagnostics/null_diagnostics.h"
|
||||
#include "toolchain/lex/string_literal.h"
|
||||
|
||||
namespace Carbon::Testing {
|
||||
namespace Carbon::Lex {
|
||||
namespace {
|
||||
|
||||
using Lex::StringLiteral;
|
||||
|
||||
static void BM_ValidString(benchmark::State& state, std::string_view introducer,
|
||||
std::string_view terminator) {
|
||||
std::string x(introducer);
|
||||
@@ -117,4 +115,4 @@ BENCHMARK(BM_SimpleStringValue_MultilineDoubleQuote);
|
||||
BENCHMARK(BM_SimpleStringValue_Raw);
|
||||
|
||||
} // namespace
|
||||
} // namespace Carbon::Testing
|
||||
} // namespace Carbon::Lex
|
||||
|
||||
Reference in New Issue
Block a user