powerd++
0.4.4
|
File local scope. More...
Typedefs | |
template<auto Ownership> | |
using | ofile = io::file< Ownership, io::write > |
Output file type alias. More... | |
Enumerations | |
enum | OE { OE::USAGE, OE::IVAL_DURATION, OE::IVAL_POLL, OE::FILE_OUTPUT, OE::FILE_PID, OE::FLAG_VERBOSE, OE::OPT_UNKNOWN, OE::OPT_NOOPT, OE::OPT_DASH, OE::OPT_LDASH, OE::OPT_DONE } |
An enum for command line parsing. More... | |
Functions | |
template<typename... MsgTs> | |
void | verbose (MsgTs &&... msg) |
Outputs the given printf style message on stderr if g.verbose is set. More... | |
void | init () |
Set up output to the given file. | |
void | read_args (int const argc, char const *const argv[]) |
Parse command line arguments. More... | |
void | print_sysctls () |
Print the sysctls. More... | |
void | run () |
Report the load frames. More... | |
Variables | |
constexpr const flag_t | FEATURES |
The set of supported features. More... | |
struct { | |
bool | verbose {false} |
Verbosity flag. | |
ms | duration {30000} |
Recording duration in ms. | |
ms | interval {25} |
Recording sample interval in ms. | |
ofile< io::link > | fout = io::fout |
The output stream either io::fout (stdout) or a file. | |
const char * | outfilename {nullptr} |
The user provided output file name. | |
const SysctlOnce< coreid_t, 2 > | ncpu {1U, {CTL_HW, HW_NCPU}} |
The number of CPU cores/threads. | |
} | g |
The global state. | |
const char *const | USAGE = "[-hv] [-d ival] [-p ival] [-o file]" |
The short usage string. | |
const Parameter< OE > | PARAMETERS [] |
Definitions of command line parameters. More... | |
File local scope.
using anonymous_namespace{loadrec.cpp}::ofile = typedef io::file<Ownership, io::write> |
Output file type alias.
Ownership | The io::ownership type of the file |
|
strong |
An enum for command line parsing.
void anonymous_namespace{loadrec.cpp}::print_sysctls | ( | ) |
Print the sysctls.
void anonymous_namespace{loadrec.cpp}::read_args | ( | int const | argc, |
char const *const | argv[] | ||
) |
Parse command line arguments.
argc,argv | The command line arguments |
void anonymous_namespace{loadrec.cpp}::run | ( | ) |
Report the load frames.
This prints the time in ms since the last frame and the cp_times growth as a space separated list.
|
inline |
Outputs the given printf style message on stderr if g.verbose is set.
MsgTs | The message argument types |
msg | The message to output |
|
constexpr |
The set of supported features.
This value is stored in load recordings to allow loadplay to correctly interpret the data.
Definitions of command line parameters.