File indexing completed on 2025-01-18 10:17:41
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <JANA/JApplication.h>
0010 #include <JANA/JFactoryGenerator.h>
0011 #include <JANA/CLI/JBenchmarker.h>
0012 #if HAVE_PODIO
0013 #include <PodioStressTest.h>
0014 #endif
0015
0016
0017
0018 int main() {
0019
0020 {
0021
0022
0023
0024
0025
0026
0027
0028
0029 auto params = new JParameterManager;
0030 params->SetParameter("jana:loglevel", "off");
0031
0032
0033 params->SetParameter("jtest:write_csv", false);
0034 params->SetParameter("jtest:parser_ms", 2);
0035 params->SetParameter("jtest:plotter_ms", 2);
0036
0037 params->SetParameter("benchmark:resultsdir", "perftest_fake_halldrecon");
0038
0039 JApplication app(params);
0040 auto logger = params->GetLogger("PerfTests");
0041 app.AddPlugin("JTest");
0042
0043 LOG_INFO(logger) << "Running JTest tuned to imitate halld_recon" << LOG_END;
0044 JBenchmarker benchmarker(&app);
0045 benchmarker.RunUntilFinished();
0046 }
0047
0048
0049 {
0050
0051 auto params = new JParameterManager;
0052 params->SetParameter("jana:loglevel", "off");
0053
0054
0055 params->SetParameter("jtest:write_csv", false);
0056
0057 params->SetParameter("jtest:parser_ms", 0);
0058 params->SetParameter("jtest:parser_spread", 0);
0059 params->SetParameter("jtest:parser_bytes", 0);
0060 params->SetParameter("jtest:parser_bytes_spread", 0);
0061
0062 params->SetParameter("jtest:disentangler_ms", 0);
0063 params->SetParameter("jtest:disentangler_spread", 0);
0064 params->SetParameter("jtest:disentangler_bytes", 0);
0065 params->SetParameter("jtest:disentangler_bytes_spread", 0);
0066
0067 params->SetParameter("jtest:tracker_ms", 0);
0068 params->SetParameter("jtest:tracker_spread", 0);
0069 params->SetParameter("jtest:tracker_bytes", 0);
0070 params->SetParameter("jtest:tracker_bytes_spread", 0);
0071
0072 params->SetParameter("jtest:plotter_ms", 0);
0073 params->SetParameter("jtest:plotter_spread", 0);
0074 params->SetParameter("jtest:plotter_bytes", 0);
0075 params->SetParameter("jtest:plotter_bytes_spread", 0);
0076
0077 params->SetParameter("benchmark:resultsdir", "perftest_pure_overhead");
0078
0079 JApplication app(params);
0080 auto logger = params->GetLogger("PerfTests");
0081 app.AddPlugin("JTest");
0082
0083 LOG_INFO(logger) << "Running JTest with all sleeps and computations turned off" << LOG_END;
0084 JBenchmarker benchmarker(&app);
0085 benchmarker.RunUntilFinished();
0086 }
0087
0088 #if HAVE_PODIO
0089 {
0090
0091
0092 ExampleHitCollection c;
0093
0094 auto params = new JParameterManager;
0095 params->SetParameter("jana:loglevel", "off");
0096 JApplication app(params);
0097 auto logger = params->GetLogger("PerfTests");
0098
0099 LOG_INFO(logger) << "Running PODIO stress test" << LOG_END;
0100 JBenchmarker benchmarker(&app);
0101 benchmarker.RunUntilFinished();
0102 }
0103 #endif
0104
0105
0106
0107
0108
0109 }