aboutsummaryrefslogtreecommitdiff
path: root/src/bench/Examples.cpp
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2018-05-23 14:14:58 +0200
committerpracticalswift <[email protected]>2018-05-23 16:07:37 +0200
commite56771365b446fa7f51a17d67f3fbe560baaa5a5 (patch)
treefc3ccf724e5eef5b2eb4fde3b2b4115601f1af23 /src/bench/Examples.cpp
parentdocs: Add a note about the source code filename naming convention (diff)
downloaddiscoin-e56771365b446fa7f51a17d67f3fbe560baaa5a5.tar.xz
discoin-e56771365b446fa7f51a17d67f3fbe560baaa5a5.zip
Do not use uppercase characters in source code filenames
Diffstat (limited to 'src/bench/Examples.cpp')
-rw-r--r--src/bench/Examples.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/bench/Examples.cpp b/src/bench/Examples.cpp
deleted file mode 100644
index b68c9cd15..000000000
--- a/src/bench/Examples.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2015-2017 The Bitcoin Core developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include <bench/bench.h>
-#include <validation.h>
-#include <utiltime.h>
-
-// Sanity test: this should loop ten times, and
-// min/max/average should be close to 100ms.
-static void Sleep100ms(benchmark::State& state)
-{
- while (state.KeepRunning()) {
- MilliSleep(100);
- }
-}
-
-BENCHMARK(Sleep100ms, 10);
-
-// Extremely fast-running benchmark:
-#include <math.h>
-
-volatile double sum = 0.0; // volatile, global so not optimized away
-
-static void Trig(benchmark::State& state)
-{
- double d = 0.01;
- while (state.KeepRunning()) {
- sum += sin(d);
- d += 0.000001;
- }
-}
-
-BENCHMARK(Trig, 12 * 1000 * 1000);