8#include "roo_io/fs/filesystem.h"
16#ifdef ROO_MONITORING_TESTING
31 return (d < 10) ? d +
'0' : d - 10 +
'A';
35String
subdir(String base,
const String& sub);
37String
filepath(String dir, int64_t file);
42std::vector<int64_t>
listFiles(roo_io::Mount& fs,
const char* dirname);
Helper class for generating filenames corresponding to timestamps.
const char * filename() const
Returns the generated filename as a null-terminated string.
static Filename forTimestamp(int64_t nanosSinceEpoch)
Creates a filename for the specified timestamp.
Umbrella header for the roo_monitoring module.
static const int kRangeElementCount
Number of items in a range (4^(kRangeLength)).
const char * kLogSubPath
Subdirectory name used for raw log files.
static const int kRangeLength
Number of base-4 digits used per range.
String filepath(String dir, int64_t file)
Returns a file path for the given directory and timestamp-like value.
const char * kMonitoringBasePath
Base directory for monitoring storage on the filesystem.
std::vector< int64_t > listFiles(roo_io::Mount &fs, const char *dirname)
Lists timestamp-named files in the directory and returns their timestamps.
constexpr char toHexDigit(int d)
Converts a 0-15 value to an uppercase hex digit.
String subdir(String base, const String &sub)
Returns a path formed by joining the base directory and subdirectory.