JayBeams
0.1
Another project to have fun coding.
|
Keep statistics about a feed and its book depth. More...
#include <book_depth_statistics.hpp>
Classes | |
class | config |
Configure a book_depth_statistics object. More... | |
Public Member Functions | |
book_depth_statistics (config const &cfg) | |
Constructor. More... | |
template<typename book_depth_t > | |
void | sample (book_depth_t book_depth) |
Record a sample, that is book depth value after the event. More... | |
void | print_csv (std::string const &name, std::ostream &os) const |
Print all the measurements in CSV format. More... | |
Static Public Member Functions | |
static void | print_csv_header (std::ostream &os) |
Print a CSV header. More... | |
Private Types | |
typedef histogram< integer_range_binning< book_depth_t > > | book_depth_histogram_t |
Private Attributes | |
book_depth_histogram_t | book_depth_ |
Keep statistics about a feed and its book depth.
Definition at line 17 of file book_depth_statistics.hpp.
|
private |
Definition at line 63 of file book_depth_statistics.hpp.
|
explicit |
Constructor.
Definition at line 38 of file book_depth_statistics.cpp.
void jb::book_depth_statistics::print_csv | ( | std::string const & | name, |
std::ostream & | os | ||
) | const |
Print all the measurements in CSV format.
Definition at line 51 of file book_depth_statistics.cpp.
References book_depth_, and jb::histogram< binning_strategy_t, counter_type_t >::nsamples().
Referenced by BOOST_AUTO_TEST_CASE(), main(), and sample().
|
static |
Print a CSV header.
The fields include:
os | the output stream |
Definition at line 43 of file book_depth_statistics.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), main(), and sample().
|
inline |
Record a sample, that is book depth value after the event.
book_depth_t | the type used to record the book depth after processing the event. |
book_depth | : the book depth (after processing the event) to be recorded. |
Definition at line 33 of file book_depth_statistics.hpp.
References book_depth_, print_csv(), print_csv_header(), and jb::histogram< binning_strategy_t, counter_type_t >::sample().
Referenced by BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 64 of file book_depth_statistics.hpp.
Referenced by print_csv(), and sample().