Skip to content

Commit

Permalink
add RefCount benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
vigsterkr committed May 23, 2018
1 parent e7300ab commit 470b35c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/shogun/CMakeLists.txt
Expand Up @@ -573,6 +573,7 @@ IF (BUILD_BENCHMARKS)

ADD_SHOGUN_BENCHMARK(features/RandomFourierDotFeatures_benchmark)
ADD_SHOGUN_BENCHMARK(features/hashed/HashedDocDotFeatures_benchmark)
ADD_SHOGUN_BENCHMARK(lib/RefCount_benchmark)
ENDIF()

#############################################
Expand Down
23 changes: 23 additions & 0 deletions src/shogun/lib/RefCount_benchmark.cc
@@ -0,0 +1,23 @@
/*
* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Authors: Viktor Gal
*/

#include <benchmark/benchmark.h>

#include "shogun/lib/RefCount.h"

namespace shogun
{

static void BM_RefCount(benchmark::State& state)
{
RefCount rf;
for (auto _ : state)
rf.ref();
}

BENCHMARK(BM_RefCount);

}

0 comments on commit 470b35c

Please sign in to comment.