LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Private Attributes | List of all members
lsst::afw::math::GaussianProcessTimer Class Reference

This is a structure for keeping track of how long the interpolation methods spend on different parts of the interpolation. More...

#include <GaussianProcess.h>

Public Member Functions

 GaussianProcessTimer ()
 
void reset ()
 Resets all of the data members of GaussianProcessTimer to zero. More...
 
void start ()
 Starts the timer for an individual call to an interpolation routine. More...
 
void addToEigen ()
 Adds time to _eigenTime. More...
 
void addToVariance ()
 Adds time to _varianceTime. More...
 
void addToSearch ()
 Adds time to _searchTime. More...
 
void addToIteration ()
 Adds time to _iterationTime. More...
 
void addToTotal (int i)
 Adds time to _totalTime and adds counts to _interpolationCount. More...
 
void display ()
 Displays the current values of all times and _interpolationCount. More...
 

Private Attributes

double _before
 
double _beginning
 
double _eigenTime
 
double _iterationTime
 
double _searchTime
 
double _varianceTime
 
double _totalTime
 
int _interpolationCount
 

Detailed Description

This is a structure for keeping track of how long the interpolation methods spend on different parts of the interpolation.

_eigenTime keeps track of how much time is spent using Eigen's linear algebra packages

_iterationTime keeps track of how much time is spent iterating over matrix indices (this is also a catch-all for time that does not obviously fit in the other categories)

_searchTime keeps track of how much time is spent on nearest neighbor searches (when applicable)

_varianceTime keeps track of how much time is spent calculating the variance of our interpolated function value (note: time spent using Eigen packages for this purpose is tallied here, not in _eigenTime)

_totalTime keeps track of how much time total is spent on interpolations

_interpolationCount keeps track of how many points have been interpolated

Definition at line 66 of file GaussianProcess.h.

Constructor & Destructor Documentation

lsst::afw::math::GaussianProcessTimer::GaussianProcessTimer ( )

Member Function Documentation

void lsst::afw::math::GaussianProcessTimer::addToEigen ( )

Adds time to _eigenTime.

Definition at line 65 of file GaussianProcess.cc.

66 {
67  double after;
68  after = double(lsst::daf::base::DateTime::now().get()*24*60*60);
69  _eigenTime += after - _before;
70  _before = after;
71 }
static DateTime now(void)
Definition: DateTime.cc:554
void lsst::afw::math::GaussianProcessTimer::addToIteration ( )

Adds time to _iterationTime.

Definition at line 89 of file GaussianProcess.cc.

90 {
91  double after;
92  after = double(lsst::daf::base::DateTime::now().get()*24*60*60);
93  _iterationTime += after - _before;
94  _before = after;
95 }
static DateTime now(void)
Definition: DateTime.cc:554
void lsst::afw::math::GaussianProcessTimer::addToSearch ( )

Adds time to _searchTime.

Definition at line 81 of file GaussianProcess.cc.

82 {
83  double after;
84  after = double(lsst::daf::base::DateTime::now().get()*24*60*60);
85  _searchTime += after - _before;
86  _before = after;
87 }
static DateTime now(void)
Definition: DateTime.cc:554
void lsst::afw::math::GaussianProcessTimer::addToTotal ( int  i)

Adds time to _totalTime and adds counts to _interpolationCount.

Parameters
[in]ithe number of counts to add to _interpolationCount

Definition at line 97 of file GaussianProcess.cc.

98 {
99  double after;
100  after = double(lsst::daf::base::DateTime::now().get()*24*60*60);
101  _totalTime += after - _beginning;
102  _interpolationCount += i;
103 }
static DateTime now(void)
Definition: DateTime.cc:554
void lsst::afw::math::GaussianProcessTimer::addToVariance ( )

Adds time to _varianceTime.

Definition at line 73 of file GaussianProcess.cc.

74 {
75  double after;
76  after = double(lsst::daf::base::DateTime::now().get()*24*60*60);
77  _varianceTime += after - _before;
78  _before = after;
79 }
static DateTime now(void)
Definition: DateTime.cc:554
void lsst::afw::math::GaussianProcessTimer::display ( )

Displays the current values of all times and _interpolationCount.

Definition at line 105 of file GaussianProcess.cc.

105  {
106  std::cout << "\nSearch time " << _searchTime << "\n";
107  std::cout << "Eigen time " << _eigenTime << "\n";
108  std::cout << "Variance time " << _varianceTime << "\n";
109  std::cout << "Iteration time " << _iterationTime << "\n";
110  std::cout << "Total time " << _totalTime << "\n";
111  std::cout << "Number of interpolations " << _interpolationCount << "\n";
112 }
void lsst::afw::math::GaussianProcessTimer::reset ( )

Resets all of the data members of GaussianProcessTimer to zero.

Definition at line 48 of file GaussianProcess.cc.

void lsst::afw::math::GaussianProcessTimer::start ( )

Starts the timer for an individual call to an interpolation routine.

Definition at line 59 of file GaussianProcess.cc.

Member Data Documentation

double lsst::afw::math::GaussianProcessTimer::_before
private

Definition at line 116 of file GaussianProcess.h.

double lsst::afw::math::GaussianProcessTimer::_beginning
private

Definition at line 116 of file GaussianProcess.h.

double lsst::afw::math::GaussianProcessTimer::_eigenTime
private

Definition at line 117 of file GaussianProcess.h.

int lsst::afw::math::GaussianProcessTimer::_interpolationCount
private

Definition at line 118 of file GaussianProcess.h.

double lsst::afw::math::GaussianProcessTimer::_iterationTime
private

Definition at line 117 of file GaussianProcess.h.

double lsst::afw::math::GaussianProcessTimer::_searchTime
private

Definition at line 117 of file GaussianProcess.h.

double lsst::afw::math::GaussianProcessTimer::_totalTime
private

Definition at line 117 of file GaussianProcess.h.

double lsst::afw::math::GaussianProcessTimer::_varianceTime
private

Definition at line 117 of file GaussianProcess.h.


The documentation for this class was generated from the following files: