* Introduce `nano::elapse ()` helper * Move stats test to a dedicated file * Missing override & smaller improvements * nano::stats::dump * Move implementation to .cpp file * Index stats by a dedicated struct * Remove stat observers * Overhaul * Config * Use dedicated thread * Separate stat sinks * Samples writer * Fix for max size * Simple sampler key * Expected min max * Fix tests * Cleanup * Test for samples rpc * Implement sampling for node components * TODO * Remove special semantics of `stat::detail::all` * Guard against invalid values * Thread loop interval * More tests * Flag to aggregate `stat::detail::all` --------- Co-authored-by: Colin LeMahieu <clemahieu@gmail.com>
23 lines
No EOL
471 B
C++
23 lines
No EOL
471 B
C++
#include <nano/lib/stats_enums.hpp>
|
|
|
|
#include <magic_enum.hpp>
|
|
|
|
std::string_view nano::to_string (nano::stat::type type)
|
|
{
|
|
return magic_enum::enum_name (type);
|
|
}
|
|
|
|
std::string_view nano::to_string (nano::stat::detail detail)
|
|
{
|
|
return magic_enum::enum_name (detail);
|
|
}
|
|
|
|
std::string_view nano::to_string (nano::stat::dir dir)
|
|
{
|
|
return magic_enum::enum_name (dir);
|
|
}
|
|
|
|
std::string_view nano::to_string (nano::stat::sample sample)
|
|
{
|
|
return magic_enum::enum_name (sample);
|
|
} |