labath added a comment.

Some general thoughts:

- instead of throwing patches around in might be good to have a discussion 
thread to determine all the requirements and figure out the general direction
- it would be better to have a series of smaller patches (like this one) 
instead one big patch implementing everything



================
Comment at: lldb/include/lldb/Utility/Analytics.h:43
+private:
+  std::vector<unsigned> m_counters;
+  bool m_collecting_analytics = false;
----------------
This assumes all statistics can be represented as integers. Here's an idea how 
that could be done with a flexible type representation 
<https://godbolt.org/z/j6f3bhP8P>.


================
Comment at: lldb/source/Utility/Analytics.cpp:40-41
+#include "lldb/Utility/Metrics.def"
+  case Metric::MaxID:
+    llvm_unreachable("invalid metric");
+  }
----------------
You could get rid of these if you made MaxID a synonym for the highest valued 
entry.


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

https://reviews.llvm.org/D110893

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

Reply via email to