mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-09 20:41:04 -04:00
refactor(performance_monitor): pass namespaces by value
This commit is contained in:
parent
1e230b411d
commit
5702bd0a12
@ -45,7 +45,7 @@ class performance_monitor {
|
|||||||
static inline constexpr size_t kNumInlineContext{3};
|
static inline constexpr size_t kNumInlineContext{3};
|
||||||
|
|
||||||
static std::unique_ptr<performance_monitor>
|
static std::unique_ptr<performance_monitor>
|
||||||
create(std::unordered_set<std::string> const& enabled_namespaces,
|
create(std::unordered_set<std::string> enabled_namespaces,
|
||||||
std::shared_ptr<file_access const> fa = nullptr,
|
std::shared_ptr<file_access const> fa = nullptr,
|
||||||
std::optional<std::filesystem::path> trace_file = std::nullopt);
|
std::optional<std::filesystem::path> trace_file = std::nullopt);
|
||||||
|
|
||||||
|
@ -380,8 +380,8 @@ performance_monitor_proxy::performance_monitor_proxy(
|
|||||||
: mon_{mon && mon->is_enabled(mon_namespace) ? std::move(mon) : nullptr}
|
: mon_{mon && mon->is_enabled(mon_namespace) ? std::move(mon) : nullptr}
|
||||||
, namespace_{mon_namespace} {}
|
, namespace_{mon_namespace} {}
|
||||||
|
|
||||||
std::unique_ptr<performance_monitor> performance_monitor::create(
|
std::unique_ptr<performance_monitor>
|
||||||
std::unordered_set<std::string> const& enabled_namespaces,
|
performance_monitor::create(std::unordered_set<std::string> enabled_namespaces,
|
||||||
std::shared_ptr<file_access const> fa,
|
std::shared_ptr<file_access const> fa,
|
||||||
std::optional<std::filesystem::path> trace_file) {
|
std::optional<std::filesystem::path> trace_file) {
|
||||||
return enabled_namespaces.empty()
|
return enabled_namespaces.empty()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user