@@ -21,11 +21,11 @@ static std::string GetAlgoName(int algo) {
2121 return " error" ;
2222}
2323
24- static void BM_ATLAS_Decompress (benchmark::State &state, int algo) {
24+ static void BM_ATLAS_Decompress (benchmark::State &state, int algo, std::string filename ) {
2525
2626 int comp_level = state.range (0 );
2727 std::string comp_setting = std::to_string (algo * 100 + comp_level);
28- std::string old_filename = (RB::GetDataDir () + " /gg_data-zstd .root" ).c_str ();
28+ std::string old_filename = (RB::GetDataDir () + " /" + filename + " .root" ).c_str ();
2929 std::string new_filename = " level_" + std::to_string (comp_level) + " _atlas_" + GetAlgoName (algo) + " .root" ;
3030
3131 gSystem ->Exec ((" hadd -v 0 -f" + comp_setting + " " + new_filename + " " + old_filename).c_str ());
@@ -56,35 +56,64 @@ static void BM_ATLAS_Decompress(benchmark::State &state, int algo) {
5656}
5757
5858
59- static void BM_ATLAS_Decompress_ZLIB (benchmark::State &state) {
60- BM_ATLAS_Decompress (state, 1 );
59+ static void BM_ATLAS_Decompress_Real_ZLIB (benchmark::State &state) {
60+ BM_ATLAS_Decompress (state, 1 , " atlasopendata_DataMuons " );
6161}
62- static void BM_ATLAS_Decompress_LZMA (benchmark::State &state) {
63- BM_ATLAS_Decompress (state, 2 );
62+ static void BM_ATLAS_Decompress_Real_LZMA (benchmark::State &state) {
63+ BM_ATLAS_Decompress (state, 2 , " atlasopendata_DataMuons " );
6464}
65- static void BM_ATLAS_Decompress_LZ4 (benchmark::State &state) {
66- BM_ATLAS_Decompress (state, 4 );
65+ static void BM_ATLAS_Decompress_Real_LZ4 (benchmark::State &state) {
66+ BM_ATLAS_Decompress (state, 4 , " atlasopendata_DataMuons " );
6767}
68- static void BM_ATLAS_Decompress_ZSTD (benchmark::State &state) {
69- BM_ATLAS_Decompress (state, 5 );
68+ static void BM_ATLAS_Decompress_Real_ZSTD (benchmark::State &state) {
69+ BM_ATLAS_Decompress (state, 5 , " atlasopendata_DataMuons " );
7070}
7171
72+ BENCHMARK (BM_ATLAS_Decompress_Real_ZLIB)
73+ ->Arg(1 )->Arg(6 )->Arg(9 )
74+ ->Unit(benchmark::kMillisecond )->Iterations(3 );
75+
76+ BENCHMARK (BM_ATLAS_Decompress_Real_LZMA)
77+ ->Arg(1 )->Arg(6 )->Arg(9 )
78+ ->Unit(benchmark::kMillisecond )->Iterations(3 );
79+
80+ BENCHMARK (BM_ATLAS_Decompress_Real_LZ4)
81+ ->Arg(1 )->Arg(6 )->Arg(9 )
82+ ->Unit(benchmark::kMillisecond )->Iterations(3 );
83+
84+ BENCHMARK (BM_ATLAS_Decompress_Real_ZSTD)
85+ ->Arg(1 )->Arg(6 )->Arg(9 )
86+ ->Unit(benchmark::kMillisecond )->Iterations(3 );
87+
88+
89+ static void BM_ATLAS_Decompress_MC_ZLIB (benchmark::State &state) {
90+ BM_ATLAS_Decompress (state, 1 , " atlasopendata_mc_117050.ttbar_lep" );
91+ }
92+ static void BM_ATLAS_Decompress_MC_LZMA (benchmark::State &state) {
93+ BM_ATLAS_Decompress (state, 2 , " atlasopendata_mc_117050.ttbar_lep" );
94+ }
95+ static void BM_ATLAS_Decompress_MC_LZ4 (benchmark::State &state) {
96+ BM_ATLAS_Decompress (state, 4 , " atlasopendata_mc_117050.ttbar_lep" );
97+ }
98+ static void BM_ATLAS_Decompress_MC_ZSTD (benchmark::State &state) {
99+ BM_ATLAS_Decompress (state, 5 , " atlasopendata_mc_117050.ttbar_lep" );
100+ }
72101
73- BENCHMARK (BM_ATLAS_Decompress_ZLIB )
102+ BENCHMARK (BM_ATLAS_Decompress_MC_ZLIB )
74103->Arg(1 )->Arg(6 )->Arg(9 )
75- ->Unit(benchmark::kMillisecond )->Iterations(5 );
104+ ->Unit(benchmark::kMillisecond )->Iterations(3 );
76105
77- BENCHMARK (BM_ATLAS_Decompress_LZMA )
106+ BENCHMARK (BM_ATLAS_Decompress_MC_LZMA )
78107->Arg(1 )->Arg(6 )->Arg(9 )
79- ->Unit(benchmark::kMillisecond )->Iterations(5 );
108+ ->Unit(benchmark::kMillisecond )->Iterations(3 );
80109
81- BENCHMARK (BM_ATLAS_Decompress_LZ4 )
110+ BENCHMARK (BM_ATLAS_Decompress_MC_LZ4 )
82111->Arg(1 )->Arg(6 )->Arg(9 )
83- ->Unit(benchmark::kMillisecond )->Iterations(5 );
112+ ->Unit(benchmark::kMillisecond )->Iterations(3 );
84113
85- BENCHMARK (BM_ATLAS_Decompress_ZSTD )
114+ BENCHMARK (BM_ATLAS_Decompress_MC_ZSTD )
86115->Arg(1 )->Arg(6 )->Arg(9 )
87- ->Unit(benchmark::kMillisecond )->Iterations(5 );
116+ ->Unit(benchmark::kMillisecond )->Iterations(3 );
88117
89118
90119BENCHMARK_MAIN ();
0 commit comments