summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorAndrei Pavel <andrei.pavel@qualitance.com>2017-08-18 17:43:51 +0200
committerAndrei Pavel <andrei.pavel@qualitance.com>2017-08-18 17:44:05 +0200
commit29440ea06eaa1786242d38dc81be307312188787 (patch)
treeb4c4dc16482f6fadd9d6dba144aeb082ee441967 /ext
parentMerge branch 'cassandra-host-data-source' into cassandra-host-data-source-str... (diff)
downloadkea-29440ea06eaa1786242d38dc81be307312188787.tar.xz
kea-29440ea06eaa1786242d38dc81be307312188787.zip
Google Benchmark support
ReentrantSetUp* methods are needed because you can't control iteration count Usage: ./configure --with-benchmark OR ./configure --with-benchmark-source=/path/to/benchmark/src make cd src/lib/dhcpsrv/benchmarks ./run-benchmarks OR ./run-benchmarks --benchmark_filter="RegExP*"
Diffstat (limited to 'ext')
-rw-r--r--ext/.gitignore3
-rw-r--r--ext/Makefile.am5
-rw-r--r--ext/benchmark/Makefile.am11
3 files changed, 19 insertions, 0 deletions
diff --git a/ext/.gitignore b/ext/.gitignore
new file mode 100644
index 0000000000..7374b7c304
--- /dev/null
+++ b/ext/.gitignore
@@ -0,0 +1,3 @@
+/benchmark
+/gtest
+
diff --git a/ext/Makefile.am b/ext/Makefile.am
index 6cfbdee32f..9a2e830f58 100644
--- a/ext/Makefile.am
+++ b/ext/Makefile.am
@@ -3,3 +3,8 @@ SUBDIRS = coroutine
if HAVE_GTEST_SOURCE
SUBDIRS += gtest
endif
+
+if HAVE_BENCHMARK_SOURCE
+SUBDIRS += benchmark
+endif
+
diff --git a/ext/benchmark/Makefile.am b/ext/benchmark/Makefile.am
new file mode 100644
index 0000000000..1b69232217
--- /dev/null
+++ b/ext/benchmark/Makefile.am
@@ -0,0 +1,11 @@
+SUBDIRS = .
+
+CLEANFILES = benchmark.cc
+
+noinst_LIBRARIES = libbenchmark.a
+libbenchmark_a_CXXFLAGS = $(BENCHMARK_INCLUDES) $(AM_CXXFLAGS)
+nodist_libbenchmark_a_SOURCES = benchmark.cc
+
+benchmark.cc: $(BENCHMARK_SOURCE)/src/benchmark.cc
+ cp -p $(BENCHMARK_SOURCE)/src/benchmark.cc $@
+