alaCarte Maps
Renderer for OpenStreetMap tiles
Statistic Class Reference

#include <statistic.hpp>

Classes

struct  AvgMeasurement
 
class  JobMeasurement
 

Public Types

enum  Component {
  Cache = 0, ComputeRect, GeoNodes, GeoWays,
  GeoRelation, StylesheetMatch, Renderer, GeoContainsData,
  Slicing, Size
}
 
typedef boost::posix_time::time_duration duration
 
typedef boost::posix_time::ptime ptime
 

Public Member Functions

shared_ptr< JobMeasurementstartNewMeasurement (const string &stylesheet, int zoom)
 
void start (shared_ptr< Statistic::JobMeasurement > &job, Component component) const
 
void stop (shared_ptr< Statistic::JobMeasurement > &job, Component component) const
 
void finished (shared_ptr< Statistic::JobMeasurement > &job)
 
void setStats (shared_ptr< Statistic::JobMeasurement > &job, unsigned int nodes, unsigned int ways, unsigned int relations)
 
void printStatistic () const
 
 ~Statistic ()
 

Static Public Member Functions

static const shared_ptr< Statistic > & Get ()
 
static void Init (const shared_ptr< Configuration > &conf)
 

Private Member Functions

void writeToFile (const char *filename)
 
string componentToName (Component component) const
 
 Statistic (const shared_ptr< Configuration > &config)
 
 Statistic (const Statistic &)
 

Private Attributes

shared_ptr< Configurationconfig
 
boost::mutex bufferLock
 
std::vector< shared_ptr< JobMeasurement > > measurementsBuffer
 
boost::mutex avgLock
 
AvgMeasurement componentAvgs [Component::Size]
 

Static Private Attributes

static shared_ptr< Statisticinstance
 This file is part of alaCarte. More...
 

Detailed Description

Definition at line 30 of file statistic.hpp.

Member Typedef Documentation

typedef boost::posix_time::time_duration Statistic::duration

Definition at line 33 of file statistic.hpp.

typedef boost::posix_time::ptime Statistic::ptime

Definition at line 34 of file statistic.hpp.

Member Enumeration Documentation

Enumerator
Cache 
ComputeRect 
GeoNodes 
GeoWays 
GeoRelation 
StylesheetMatch 
Renderer 
GeoContainsData 
Slicing 
Size 

Definition at line 36 of file statistic.hpp.

Constructor & Destructor Documentation

Statistic::~Statistic ( )

Definition at line 46 of file statistic.cpp.

Statistic::Statistic ( const shared_ptr< Configuration > &  config)
private

Definition at line 35 of file statistic.cpp.

Statistic::Statistic ( const Statistic )
inlineprivate

Definition at line 101 of file statistic.hpp.

Member Function Documentation

string Statistic::componentToName ( Component  component) const
private

Definition at line 161 of file statistic.cpp.

void Statistic::finished ( shared_ptr< Statistic::JobMeasurement > &  job)

Definition at line 110 of file statistic.cpp.

static const shared_ptr<Statistic>& Statistic::Get ( )
inlinestatic

Definition at line 83 of file statistic.hpp.

static void Statistic::Init ( const shared_ptr< Configuration > &  conf)
inlinestatic

Definition at line 89 of file statistic.hpp.

void Statistic::printStatistic ( ) const

Definition at line 86 of file statistic.cpp.

void Statistic::setStats ( shared_ptr< Statistic::JobMeasurement > &  job,
unsigned int  nodes,
unsigned int  ways,
unsigned int  relations 
)

Definition at line 61 of file statistic.cpp.

void Statistic::start ( shared_ptr< Statistic::JobMeasurement > &  job,
Component  component 
) const

Definition at line 72 of file statistic.cpp.

shared_ptr< Statistic::JobMeasurement > Statistic::startNewMeasurement ( const string stylesheet,
int  zoom 
)

Definition at line 52 of file statistic.cpp.

void Statistic::stop ( shared_ptr< Statistic::JobMeasurement > &  job,
Component  component 
) const

Definition at line 79 of file statistic.cpp.

void Statistic::writeToFile ( const char *  filename)
private

Definition at line 142 of file statistic.cpp.

Member Data Documentation

boost::mutex Statistic::avgLock
private

Definition at line 116 of file statistic.hpp.

boost::mutex Statistic::bufferLock
private

Definition at line 107 of file statistic.hpp.

AvgMeasurement Statistic::componentAvgs[Component::Size]
private

Definition at line 117 of file statistic.hpp.

shared_ptr<Configuration> Statistic::config
private

Definition at line 106 of file statistic.hpp.

shared_ptr< Statistic > Statistic::instance
staticprivate

This file is part of alaCarte.

alaCarte is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

alaCarte is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with alaCarte. If not, see http://www.gnu.org/licenses/.

Copyright alaCarte 2012-2013 Simon Dreher, Florian Jacob, Tobias Kahlert, Patrick Niklaus, Bernhard Scheirle, Lisa Winter Maintainer: Bernhard Scheirle

Definition at line 101 of file statistic.hpp.

std::vector<shared_ptr<JobMeasurement> > Statistic::measurementsBuffer
private

Definition at line 108 of file statistic.hpp.


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