Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::MultiProcess::HeatmapAnalyzer Class Reference

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< TH2Ianalyze (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::HeatmapAnalyzerJsonDatajsonData_
 
TH2I matrix_
 
std::vector< std::string > tasks_names_
 

#include <RooFit/MultiProcess/HeatmapAnalyzer.h>

Constructor & Destructor Documentation

◆ HeatmapAnalyzer()

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.

Parameters
[in]logs_dirDirectory 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.

◆ ~HeatmapAnalyzer()

RooFit::MultiProcess::HeatmapAnalyzer::~HeatmapAnalyzer ( )
default

Member Function Documentation

◆ analyze()

std::unique_ptr< TH2I > RooFit::MultiProcess::HeatmapAnalyzer::analyze ( int  analyzed_gradient)

This method is the main functionality in this class.

It does the heavy lifting of matching duration timestamps to tasks and partition evaluations.

Parameters
[in]analyzed_gradientGradient 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.

◆ getMetadata()

std::vector< std::string > const RooFit::MultiProcess::HeatmapAnalyzer::getMetadata ( )

Definition at line 226 of file HeatmapAnalyzer.cxx.

◆ getPartitionNames()

std::vector< std::string > const RooFit::MultiProcess::HeatmapAnalyzer::getPartitionNames ( )

Definition at line 221 of file HeatmapAnalyzer.cxx.

◆ getTaskNames()

std::vector< std::string > const RooFit::MultiProcess::HeatmapAnalyzer::getTaskNames ( )

Definition at line 216 of file HeatmapAnalyzer.cxx.

Member Data Documentation

◆ eval_partitions_names_

std::vector<std::string> RooFit::MultiProcess::HeatmapAnalyzer::eval_partitions_names_
private

Definition at line 51 of file HeatmapAnalyzer.h.

◆ jsonData_

std::unique_ptr<Detail::HeatmapAnalyzerJsonData> RooFit::MultiProcess::HeatmapAnalyzer::jsonData_
private

Definition at line 49 of file HeatmapAnalyzer.h.

◆ matrix_

TH2I RooFit::MultiProcess::HeatmapAnalyzer::matrix_
private

Definition at line 48 of file HeatmapAnalyzer.h.

◆ tasks_names_

std::vector<std::string> RooFit::MultiProcess::HeatmapAnalyzer::tasks_names_
private

Definition at line 50 of file HeatmapAnalyzer.h.

  • roofit/multiprocess/inc/RooFit/MultiProcess/HeatmapAnalyzer.h
  • roofit/multiprocess/src/HeatmapAnalyzer.cxx