Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,9 @@ install:
- |
pwd
HOME_FOLDER=$(pwd)/../
export GCOV_PREFIX_STRIP=0
export GCOV_PREFIX=`pwd`
if [ "${EXTRA_OPTS}" == "-DCoverage=On" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
export GCOV_PREFIX="$HOME_FOLDER/ROOT-gcov/"
mkdir -p $GCOV_PREFIX
#export GCOV_PREFIX_STRIP=16
PATH=~/.local/bin:${PATH};
pip install --user --upgrade pip;
pip install --user cpp-coveralls;
Expand Down Expand Up @@ -155,8 +154,7 @@ script:
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="${EXTRA_FLAGS}" \
${EXTRA_OPTS} ../rootbench
- cmake --build .
- ctest -V --output-on-failure
- find $GCOV_PREFIX
- ctest -V || true
- #find $HOME_FOLDER

after_success:
Expand Down
4 changes: 2 additions & 2 deletions root/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_subdirectory(math)
#add_subdirectory(io)
#add_subdirectory(math)
add_subdirectory(io)
if (ROOT_roofit_FOUND)
add_subdirectory(roofit)
endif()
19 changes: 16 additions & 3 deletions root/io/io/TBufferMergerBenchmarks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@
#include <random>
#include <string>
#include <sstream>
#include <thread>
#include <sys/stat.h>

using namespace ROOT::Experimental;

int GetNumberHardwareThreads()
{
return std::thread::hardware_concurrency();
}

static void BM_TBufferFile_CreateEmpty(benchmark::State &state)
{
const char *filename = "empty.root";
Expand Down Expand Up @@ -45,10 +51,13 @@ static void BM_TBufferFile_GetFile(benchmark::State &state)
}
BENCHMARK(BM_TBufferFile_GetFile)->Unit(benchmark::kMicrosecond);
BENCHMARK(BM_TBufferFile_GetFile)->Unit(benchmark::kMicrosecond)->UseRealTime()->ThreadPerCpu();
BENCHMARK(BM_TBufferFile_GetFile)->Unit(benchmark::kMicrosecond)->UseRealTime()->ThreadRange(1, 256);
BENCHMARK(BM_TBufferFile_GetFile)
->Unit(benchmark::kMicrosecond)
->UseRealTime()
->ThreadRange(1, GetNumberHardwareThreads() * 2);

/// Creates a TMemFile, fills a TTree with random numbers. The data is written if it exceeds 32MB.
inline void FillTreeWithRandomData(TBufferMerger &merger, size_t nEntriesPerWorker = 24 * 1024, int flush = 32 )
inline void FillTreeWithRandomData(TBufferMerger &merger, size_t nEntriesPerWorker = 24 * 1024, int flush = 32)
{
thread_local std::default_random_engine g;
std::uniform_real_distribution<double> dist(0.0, 1.0);
Expand Down Expand Up @@ -98,7 +107,11 @@ static void BM_TBufferFile_FillTreeWithRandomData(benchmark::State &state)
}
BENCHMARK(BM_TBufferFile_FillTreeWithRandomData)->Unit(benchmark::kMicrosecond)->Arg(32);
BENCHMARK(BM_TBufferFile_FillTreeWithRandomData)->Unit(benchmark::kMicrosecond)->Arg(32)->UseRealTime()->ThreadPerCpu();
BENCHMARK(BM_TBufferFile_FillTreeWithRandomData)->Unit(benchmark::kMicrosecond)->Range(1, 32)->UseRealTime()->ThreadRange(1, 256);
BENCHMARK(BM_TBufferFile_FillTreeWithRandomData)
->Unit(benchmark::kMicrosecond)
->Range(1, 32)
->UseRealTime()
->ThreadRange(1, GetNumberHardwareThreads() * 2);

// Define our main.
BENCHMARK_MAIN();
12 changes: 6 additions & 6 deletions root/math/genvector/Cartesian3DBenchmarks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ static void BM_Cartesian3D_Theta(benchmark::State &state)
}
ComputeProcessedEntities(state, sizeof(T), VecTraits<T>::Sum(checksum));
}
BENCHMARK_TEMPLATE(BM_Cartesian3D_Theta, double)->Range(8 << 10, 8 << 20);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Theta, ROOT::Double_v)->Range(8 << 10, 8 << 20);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Theta, double)->Range(8 << 10, 8 << 20)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Theta, ROOT::Double_v)->Range(8 << 10, 8 << 20)->Unit(benchmark::kMicrosecond);
// BENCHMARK_TEMPLATE(BM_Cartesian3D_Theta, float)->Range(8 << 10, 8 << 20);
// BENCHMARK_TEMPLATE(BM_Cartesian3D_Theta, ROOT::Float_v)->Range(8 << 10, 8 << 20);

Expand All @@ -89,8 +89,8 @@ static void BM_Cartesian3D_Phi(benchmark::State &state)
}
ComputeProcessedEntities(state, sizeof(T), VecTraits<T>::Sum(checksum));
}
BENCHMARK_TEMPLATE(BM_Cartesian3D_Phi, double)->Range(8 << 10, 8 << 20);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Phi, ROOT::Double_v)->Range(8 << 10, 8 << 20);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Phi, double)->Range(8 << 10, 8 << 20)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Phi, ROOT::Double_v)->Range(8 << 10, 8 << 20)->Unit(benchmark::kMicrosecond);
// BENCHMARK_TEMPLATE(BM_Cartesian3D_Phi, float)->Range(8 << 10, 8 << 20);
// BENCHMARK_TEMPLATE(BM_Cartesian3D_Phi, ROOT::Float_v)->Range(8 << 10, 8 << 20);

Expand All @@ -115,8 +115,8 @@ static void BM_Cartesian3D_Mag2(benchmark::State &state)

ComputeProcessedEntities(state, sizeof(T), VecTraits<T>::Sum(checksum));
}
BENCHMARK_TEMPLATE(BM_Cartesian3D_Mag2, double)->Range(8 << 10, 8 << 20);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Mag2, ROOT::Double_v)->Range(8 << 10, 8 << 20);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Mag2, double)->Range(8 << 10, 8 << 20)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Cartesian3D_Mag2, ROOT::Double_v)->Range(8 << 10, 8 << 20)->Unit(benchmark::kMicrosecond);
// BENCHMARK_TEMPLATE(BM_Cartesian3D_Mag2, float)->Range(8 << 10, 8 << 20);
// BENCHMARK_TEMPLATE(BM_Cartesian3D_Mag2, ROOT::Float_v)->Range(8 << 10, 8 << 20);

Expand Down
33 changes: 16 additions & 17 deletions root/math/genvector/Transform3DBenchmarks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ static void BM_Transform3D(benchmark::State &state)
st.Translation();
}
}
BENCHMARK_TEMPLATE(BM_Transform3D, double)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Transform3D, float)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Transform3D, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Transform3D, ROOT::Float_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Transform3D, double)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Transform3D, float)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Transform3D, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Transform3D, ROOT::Float_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);

template <typename T>
using Point = ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<T>, ROOT::Math::DefaultCoordinateSystemTag>;
Expand All @@ -42,8 +42,8 @@ static void BM_Point3D(benchmark::State &state)
Point<T> sp1, sp2, sp3, sp4, sp5, sp6;
}

BENCHMARK_TEMPLATE(BM_Point3D, double)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Point3D, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Point3D, double)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Point3D, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);

template <typename T>
static void BM_Point3D_Gen(benchmark::State &state)
Expand All @@ -52,8 +52,8 @@ static void BM_Point3D_Gen(benchmark::State &state)
Point<T> sp1(p_x(ggen), p_y(ggen), p_z(ggen));
}
}
BENCHMARK_TEMPLATE(BM_Point3D_Gen, double)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Point3D_Gen, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Point3D_Gen, double)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Point3D_Gen, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);

template <typename T>
static void BM_Plane3D(benchmark::State &state)
Expand All @@ -63,9 +63,9 @@ static void BM_Plane3D(benchmark::State &state)
Plane<T> sc_plane(a, b, c, d);
}
}
BENCHMARK_TEMPLATE(BM_Plane3D, double)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Plane3D, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Plane3D, ROOT::Float_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Plane3D, double)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Plane3D, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Plane3D, ROOT::Float_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);

template <typename T>
static void BM_Plane3D_Hessian(benchmark::State &state)
Expand All @@ -76,8 +76,8 @@ static void BM_Plane3D_Hessian(benchmark::State &state)
sc_plane.HesseDistance();
}
}
BENCHMARK_TEMPLATE(BM_Plane3D_Hessian, double)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Plane3D_Hessian, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Plane3D_Hessian, double)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Plane3D_Hessian, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);

template <typename T>
static void BM_Plane3D_Normal(benchmark::State &state)
Expand All @@ -88,7 +88,6 @@ static void BM_Plane3D_Normal(benchmark::State &state)
sc_plane.Normal();
}
}
BENCHMARK_TEMPLATE(BM_Plane3D_Normal, double)->Range(8, 8 << 10)->Complexity(benchmark::o1);
;
BENCHMARK_TEMPLATE(BM_Plane3D_Normal, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Plane3D_Normal, ROOT::Float_v)->Range(8, 8 << 10)->Complexity(benchmark::o1);
BENCHMARK_TEMPLATE(BM_Plane3D_Normal, double)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Plane3D_Normal, ROOT::Double_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);
BENCHMARK_TEMPLATE(BM_Plane3D_Normal, ROOT::Float_v)->Range(8, 8 << 10)->Complexity(benchmark::o1)->Unit(benchmark::kMicrosecond);