powerd++
0.4.4
|
Implements a load recorder, useful for simulating loads to test CPU clock daemons and settings. More...
#include "Options.hpp"
#include "types.hpp"
#include "constants.hpp"
#include "errors.hpp"
#include "utility.hpp"
#include "clas.hpp"
#include "version.hpp"
#include "sys/io.hpp"
#include "sys/sysctl.hpp"
#include <chrono>
#include <thread>
#include <memory>
#include <sys/resource.h>
Namespaces | |
anonymous_namespace{loadrec.cpp} | |
File local scope. | |
Typedefs | |
template<auto Ownership> | |
using | anonymous_namespace{loadrec.cpp}::ofile = io::file< Ownership, io::write > |
Output file type alias. More... | |
Functions | |
template<typename... MsgTs> | |
void | anonymous_namespace{loadrec.cpp}::verbose (MsgTs &&... msg) |
Outputs the given printf style message on stderr if g.verbose is set. More... | |
void | anonymous_namespace{loadrec.cpp}::init () |
Set up output to the given file. | |
void | anonymous_namespace{loadrec.cpp}::read_args (int const argc, char const *const argv[]) |
Parse command line arguments. More... | |
void | anonymous_namespace{loadrec.cpp}::print_sysctls () |
Print the sysctls. More... | |
void | anonymous_namespace{loadrec.cpp}::run () |
Report the load frames. More... | |
int | main (int argc, char *argv[]) |
Main routine, setup and execute daemon, print errors. More... | |
Variables | |
constexpr const flag_t | anonymous_namespace{loadrec.cpp}::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. | |
} | anonymous_namespace{loadrec.cpp}::g |
The global state. | |
const char *const | anonymous_namespace{loadrec.cpp}::USAGE = "[-hv] [-d ival] [-p ival] [-o file]" |
The short usage string. | |
const Parameter< OE > | anonymous_namespace{loadrec.cpp}::PARAMETERS [] |
Definitions of command line parameters. More... | |
Implements a load recorder, useful for simulating loads to test CPU clock daemons and settings.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main routine, setup and execute daemon, print errors.
argc,argv | The command line arguments |