[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 27 09:04:22 PST 2025
================
@@ -73,9 +104,46 @@ class TelemetryManager : public llvm::telemetry::Manager {
private:
std::unique_ptr<llvm::telemetry::Config> m_config;
+ // Each instance of a TelemetryManager is assigned a unique ID.
+ const std::string m_id;
+
static std::unique_ptr<TelemetryManager> g_instance;
};
+/// Helper RAII class for collecting telemetry.
+class ScopeTelemetryCollector {
----------------
JDevlieghere wrote:
Do you ever need to run more than one function? If not, can we mimic `llvm::ScopeExit` and make the constructors private and have a make_scope_telemtry function which takes a lambda and, depending on whether telemetry is enabled, puts it into the object and otherwise creates an object that does nothing?
https://github.com/llvm/llvm-project/pull/127696
More information about the lldb-commits
mailing list