JDevlieghere added inline comments.

================
Comment at: lldb/include/lldb/Target/Statistics.h:96
+};
+
+class GlobalStats {
----------------
Do we expect there to be something like `DebuggerStats`? I think it would be 
nice from a hierarchy perspective that Global Stats have a map of debugger -> 
to debuggerstat who then in turn hold on to a map of target -> target stats. 
That hierarchy would work really well for JSON (except they would be lists 
instead of maps). 


================
Comment at: lldb/include/lldb/Target/Statistics.h:97-114
+class GlobalStats {
+public:
+  static void SetCollectingStats(bool enable) { g_collecting_stats = enable; }
+  static bool GetCollectingStats() { return g_collecting_stats; }
+
+  /// Get metrics associated with all targets in a debugger in JSON format.
+  ///
----------------
For things like how many lldb_asserts we've hit, this actually will contain its 
own stats, not just things per debugger and target. I think it makes more sense 
to make this a Singleton as I did in D110895.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111686/new/

https://reviews.llvm.org/D111686

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to