summaryrefslogtreecommitdiffstats
path: root/llvm/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/benchmarks')
-rw-r--r--llvm/benchmarks/CMakeLists.txt4
-rw-r--r--llvm/benchmarks/DummyYAML.cpp13
2 files changed, 17 insertions, 0 deletions
diff --git a/llvm/benchmarks/CMakeLists.txt b/llvm/benchmarks/CMakeLists.txt
new file mode 100644
index 00000000000..43f88f72579
--- /dev/null
+++ b/llvm/benchmarks/CMakeLists.txt
@@ -0,0 +1,4 @@
+set(LLVM_LINK_COMPONENTS
+ Support)
+
+add_benchmark(DummyYAML DummyYAML.cpp)
diff --git a/llvm/benchmarks/DummyYAML.cpp b/llvm/benchmarks/DummyYAML.cpp
new file mode 100644
index 00000000000..c06b001bb03
--- /dev/null
+++ b/llvm/benchmarks/DummyYAML.cpp
@@ -0,0 +1,13 @@
+#include "benchmark/benchmark.h"
+#include "llvm/Support/YAMLTraits.h"
+
+static void BM_YAMLDummyIsNumeric(benchmark::State& state) {
+ std::string x = "hello";
+ for (auto _ : state) {
+ std::string copy(x);
+ llvm::yaml::isNumeric(copy);
+ }
+}
+BENCHMARK(BM_YAMLDummyIsNumeric);
+
+BENCHMARK_MAIN();
OpenPOWER on IntegriCloud