Advanced category for configuration options (#125)
Adds advanced category - advanced category hides less relevant configuration options - omnitrace-avail has new '--advanced' option which shows these flags - increase verbosity level to print issue with reading ppid children - OMNITRACE_ROCTRACER_HSA_ACTIVITY defaults to ON - OMNITRACE_ROCTRACER_HSA_API defaults to ON
Tento commit je obsažen v:
@@ -181,6 +181,11 @@ main(int argc, char** argv)
|
||||
.action([](parser_t& p) {
|
||||
verbose_level = (p.get_count("verbose") == 0) ? 1 : p.get<int>("verbose");
|
||||
});
|
||||
parser
|
||||
.add_argument({ "--advanced" },
|
||||
"Print advanced settings not relevant to most use cases")
|
||||
.max_count(1)
|
||||
.action([](parser_t& p) { print_advanced = p.get<bool>("advanced"); });
|
||||
parser.add_argument({ "-a", "--all" }, "Print all available info")
|
||||
.max_count(1)
|
||||
.action([&](parser_t& p) {
|
||||
@@ -489,6 +494,10 @@ main(int argc, char** argv)
|
||||
category_regex_keys.emplace_back(_pos_regex);
|
||||
}
|
||||
|
||||
if(category_view.count("advanced") > 0 ||
|
||||
category_view.count("settings::advanced") > 0)
|
||||
print_advanced = true;
|
||||
|
||||
if(category_view.empty()) category_view = _category_options;
|
||||
|
||||
if(!include_components && !include_settings && !include_hw_counters)
|
||||
@@ -786,14 +795,14 @@ write_settings_info(std::ostream& os, const array_t<bool, N>& opts,
|
||||
{
|
||||
str_set_t _categories{};
|
||||
for(const auto& citr : sitr->second->get_categories())
|
||||
{
|
||||
_categories.emplace(TIMEMORY_JOIN("::", "settings", citr));
|
||||
}
|
||||
bool _found = false;
|
||||
for(const auto& citr : _categories)
|
||||
{
|
||||
if(category_view.count(citr) > 0) _found = true;
|
||||
}
|
||||
if(!print_advanced && _categories.count("settings::advanced") > 0)
|
||||
_not_in_category_view.emplace(_name);
|
||||
if(!_found)
|
||||
{
|
||||
_not_in_category_view.emplace(_name);
|
||||
|
||||
@@ -42,6 +42,7 @@ bool case_insensitive = false;
|
||||
bool regex_hl = false;
|
||||
bool expand_keys = false;
|
||||
bool force_config = false;
|
||||
bool print_advanced = false;
|
||||
int32_t max_width = 0;
|
||||
int32_t num_cols = 0;
|
||||
int32_t min_width = 40;
|
||||
|
||||
@@ -95,6 +95,7 @@ extern bool case_insensitive;
|
||||
extern bool regex_hl;
|
||||
extern bool expand_keys;
|
||||
extern bool force_config;
|
||||
extern bool print_advanced;
|
||||
extern int32_t max_width;
|
||||
extern int32_t num_cols;
|
||||
extern int32_t min_width;
|
||||
|
||||
@@ -242,7 +242,7 @@ omnitrace_add_bin_test(
|
||||
omnitrace_add_bin_test(
|
||||
NAME omnitrace-avail-category-filter-timemory
|
||||
TARGET omnitrace-avail
|
||||
ARGS --categories settings::timemory --brief
|
||||
ARGS --categories settings::timemory --brief --advanced
|
||||
LABELS "omnitrace-avail"
|
||||
TIMEOUT 45
|
||||
PASS_REGEX
|
||||
@@ -262,6 +262,7 @@ omnitrace_add_bin_test(
|
||||
~PROCESS_SAMPLING
|
||||
--csv
|
||||
--brief
|
||||
--advanced
|
||||
LABELS "omnitrace-avail"
|
||||
TIMEOUT 45
|
||||
PASS_REGEX "ENVIRONMENT VARIABLE,[ \n]+OMNITRACE_USE_PID,[ \n]+"
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele