aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/build
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-01-15 15:46:39 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-01-15 15:46:39 -0800
commit297fafa078a8a43a4ddb693129b8e25b9d0bf618 (patch)
treed02a54023ea8b9b56669b36c8b287f045998c202 /test/build
parentfbf4051ef2d08d53cdb486722c1111d614865d63 (diff)
Opportunistically use perftools if installed.
Allows us to collect profiles of the open source build using gprof.
Diffstat (limited to 'test/build')
-rw-r--r--test/build/perftools.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/build/perftools.c b/test/build/perftools.c
new file mode 100644
index 0000000000..03548b4c7e
--- /dev/null
+++ b/test/build/perftools.c
@@ -0,0 +1,7 @@
+#include <gperftools/profiler.h>
+
+int main() {
+ ProfilerStart("/dev/null");
+ ProfilerStop();
+ return 0;
+}