Reads and processes logfiles produced by RooFit::MultiProcess::ProcessTimer.
RooFit::MultiProcess::ProcessTimer records timings of multiple processes simultaneously and allows for these timings to be written out in json format, one for each process. This class, the HeatmapAnalyzer, can read these json files and produce a heatmap from them with partial derivatives on the y-axis, likelihood evaluations on the x-axis, and time expenditures on the z-axis. This class also contains some convenience functions for inspecting these log files.
Note that this class requires the logfiles to contain three specific keys in the json:
master:gradient
containing an array of gradient timestamps*eval_task*<task_number>
containing an array of task evaluation timestamps.*eval_partition*
containing an array of partition evaluation timestamps Definition at line 34 of file HeatmapAnalyzer.h.
Public Member Functions | |
HeatmapAnalyzer (std::string const &logs_dir) | |
HeatmapAnalyzer Constructor. | |
~HeatmapAnalyzer () | |
std::unique_ptr< TH2I > | analyze (int analyzed_gradient) |
This method is the main functionality in this class. | |
std::vector< std::string > const | getMetadata () |
std::vector< std::string > const | getPartitionNames () |
std::vector< std::string > const | getTaskNames () |
Private Attributes | |
std::vector< std::string > | eval_partitions_names_ |
std::unique_ptr< Detail::HeatmapAnalyzerJsonData > | jsonData_ |
TH2I | matrix_ |
std::vector< std::string > | tasks_names_ |
#include <RooFit/MultiProcess/HeatmapAnalyzer.h>
RooFit::MultiProcess::HeatmapAnalyzer::HeatmapAnalyzer | ( | std::string const & | logs_dir | ) |
HeatmapAnalyzer Constructor.
This method reads the input files in the folder specified by the user and creates internal attributes used by the other methods in this class.
[in] | logs_dir | Directory where log files are stored in the format outputted by RooFit::MultiProcess::ProcessTimer. There can be other files in this directory as well. |
Definition at line 95 of file HeatmapAnalyzer.cxx.
|
default |
This method is the main functionality in this class.
It does the heavy lifting of matching duration timestamps to tasks and partition evaluations.
[in] | analyzed_gradient | Gradient to analyze. For example, setting to 1 analyzes the first gradient (ordered by time) in the logs. |
Definition at line 144 of file HeatmapAnalyzer.cxx.
std::vector< std::string > const RooFit::MultiProcess::HeatmapAnalyzer::getMetadata | ( | ) |
Definition at line 226 of file HeatmapAnalyzer.cxx.
std::vector< std::string > const RooFit::MultiProcess::HeatmapAnalyzer::getPartitionNames | ( | ) |
Definition at line 221 of file HeatmapAnalyzer.cxx.
std::vector< std::string > const RooFit::MultiProcess::HeatmapAnalyzer::getTaskNames | ( | ) |
Definition at line 216 of file HeatmapAnalyzer.cxx.
|
private |
Definition at line 51 of file HeatmapAnalyzer.h.
|
private |
Definition at line 49 of file HeatmapAnalyzer.h.
|
private |
Definition at line 48 of file HeatmapAnalyzer.h.
|
private |
Definition at line 50 of file HeatmapAnalyzer.h.