Definition at line 20 of file test_resmon_plugin.cpp.
◆ initialize()
void resmon_fixture::initialize |
( |
const std::vector< std::string > & | args | ) |
|
|
inline |
Definition at line 26 of file test_resmon_plugin.cpp.
26 {
27
28
30 SYS_ASSERT(args.size() < 10, chain::plugin_exception,
"number of arguments (${size}) must be less than 10", (
"size", args.size()));
31
32
33 for (size_t i=0; i<args.size(); ++i) {
34 argv[i+1] = args[i].c_str();
35 }
36
37 bpo::variables_map options;
38 bpo::store(bpo::parse_command_line(args.size()+1,
argv,
_cfg), options);
39 bpo::notify(options);
40
42 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
void plugin_initialize(const variables_map &options)
resource_monitor_plugin _my
◆ plugin_startup()
void resmon_fixture::plugin_startup |
( |
const std::vector< bfs::path > & | dirs, |
|
|
int | runTimeSecs = 3 ) |
|
inline |
Definition at line 49 of file test_resmon_plugin.cpp.
49 {
50 set_options({
"--resource-monitor-interval-seconds=1"});
51
52 for (auto& dir: dirs) {
54 }
55
57 std::this_thread::sleep_for( std::chrono::milliseconds(runTimeSecs*1000) );
59 }
void monitor_directory(const bfs::path &path)
void set_options(const std::vector< std::string > &arg)
◆ set_options()
void resmon_fixture::set_options |
( |
const std::vector< std::string > & | arg | ) |
|
|
inline |
Definition at line 44 of file test_resmon_plugin.cpp.
44 {
47 }
void initialize(const std::vector< std::string > &args)
void set_program_options()
◆ set_program_options()
void resmon_fixture::set_program_options |
( |
| ) |
|
|
inline |
Definition at line 21 of file test_resmon_plugin.cpp.
21 {
22 options_description
dummy;
24 }
virtual void set_program_options(options_description &, options_description &cfg) override
constexpr enabler dummy
An instance to use in EnableIf.
◆ _cfg
options_description resmon_fixture::_cfg |
◆ _my
The documentation for this struct was generated from the following file: