libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
A simple class that is used to create a CSV-formatted file of timestamps, from which a histogram might be generated. More...
#include <latency_timestamps.hpp>
Public Member Functions | |
latency_timestamps (size_type num_tses) noexcept(false) | |
size_type | size () const noexcept(true) |
REALLY_FORCE_INLINE void | push_back (element_type const &ts) noexcept(true) override |
Add a timestamp on the hot-path. More... | |
void | to_csv (std::ostream &os) const noexcept(false) |
Write the timestamps, if any, to the output-stream. More... | |
void | write_to_csv_file (std::ostream &os, char const *const root) const noexcept(false) |
Wrtie the timestamps, if any, to a CSV file. More... | |
void | write_to_named_csv_file (std::ostream &os, std::string const &base_filename) const noexcept(false) |
Wrtie the timestamps, if any, to the named CSV file. More... | |
![]() | |
virtual | ~latency_timestamps_itf ()=default |
Additional Inherited Members | |
![]() | |
using | size_type = std::size_t |
using | timer_t = cpu_timer::in_order |
using | element_type = timestamp |
![]() | |
latency_timestamps_itf ()=default | |
A simple class that is used to create a CSV-formatted file of timestamps, from which a histogram might be generated.
Compatible with no_latency_timestamps.
Definition at line 90 of file latency_timestamps.hpp.
|
explicitnoexcept |
Definition at line 33 of file latency_timestamps.cpp.
References latency_timestamps().
Referenced by latency_timestamps(), main(), and isimud::ISIMUD_VER_NAMESPACE::exchanges::fix_to_link::main().
|
inlineoverridevirtualnoexcept |
Add a timestamp on the hot-path.
As this is on the hot-path minimal processing is done. The location to be written to is loaded using a technique that minimises cache usage: this might be slightly slower, but attempts to avoid overwriting the entire contents of each cache in the hierarchy. Note that this function is thread-safe & re-entrant safe.
Implements jmmcg::LIBJMMCG_VER_NAMESPACE::latency_timestamps_itf.
Definition at line 48 of file latency_timestamps_impl.hpp.
References size().
|
inlinenoexcept |
Definition at line 40 of file latency_timestamps_impl.hpp.
Referenced by push_back().
|
noexcept |
Write the timestamps, if any, to the output-stream.
os | The output stream to which the timestamps, in CSV format, should be written. |
Definition at line 41 of file latency_timestamps.cpp.
Referenced by write_to_csv_file(), and write_to_named_csv_file().
|
noexcept |
Wrtie the timestamps, if any, to a CSV file.
os | Write log output to this output stream. |
root | Write the timestamps, in CSV format, to a file with the filename root as specified. Unique identifying text will be appended and ".csv" shall be the extension. |
Definition at line 56 of file latency_timestamps.cpp.
References to_csv().
Referenced by main(), and isimud::ISIMUD_VER_NAMESPACE::exchanges::fix_to_link::main().
|
noexcept |
Wrtie the timestamps, if any, to the named CSV file.
os | Write log output to this output stream. |
base_filename | Write the timestamps, in CSV format, to a file with the base of the filename as specified, the extension ".csv" will be appended. |
Definition at line 67 of file latency_timestamps.cpp.
References to_csv().