7#ifndef __PFUNCTIONTIMER_H__
8#define __PFUNCTIONTIMER_H__
23 void resize(
size_t nbMeasure);
25 template<
typename _Callable,
typename... _Args>
26 void evalPerf(_Callable&& __f, _Args&&... __args);
28 bool savePerf(
const std::string & fileName)
const;
29 void getSortedPerf(std::vector<double> & orderPerfNs, std::vector<double> & orderPerfCy)
const;
37 void saveQuantilePerf(std::ofstream & fs,
const std::vector<double> & orderPerfNs,
const std::vector<double> & orderPerfCy,
38 const std::string & name,
size_t valueIndex)
const;
bool savePerf(const std::string &fileName) const
Save the performance of the function in a file.
size_t p_nbElement
Number of elements the function is computing (supposed to be constant for all the performance tests).
PFunctionTimer & operator=(const PFunctionTimer &other)
Definition of equal operator of PFunctionTimer.
std::vector< double > p_vecEllapsedTimeNs
Ellapsed time of the function in nanoseconds.
virtual ~PFunctionTimer()
Destructor of PFunctionTimer.
PFunctionTimer(size_t nbMeasure=0lu, size_t nbElement=0lu)
Default constructor of PFunctionTimer.
void saveQuantilePerf(std::ofstream &fs, const std::vector< double > &orderPerfNs, const std::vector< double > &orderPerfCy, const std::string &name, size_t valueIndex) const
Save the performance of the given quantile.
size_t p_nbMeasure
Number of performance measures we want on this function.
void getSortedPerf(std::vector< double > &orderPerfNs, std::vector< double > &orderPerfCy) const
Get the ordered performances.
void resize(size_t nbMeasure)
Resize the number of possible measures.
std::vector< double > p_vecEllapsedTimeCycle
Ellapsed time of the function in cycles.
void copyPFunctionTimer(const PFunctionTimer &other)
Copy function of PFunctionTimer.
void evalPerf(_Callable &&__f, _Args &&... __args)
Method which evaluate performance of the given function.
void initialisationPFunctionTimer(size_t nbMeasure, size_t nbElement)
Initialisation function of the class PFunctionTimer.
void setNbElement(size_t nbElement)
Set the number of elements to consider for the function timing.
size_t getNbElement() const
Get the number of elements computed in the performance test.