[lldb] [llvm] [lldb]Implement LLDB Telemetry (PR #98528)
Vy Nguyen via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 12:23:50 PDT 2024
================
@@ -682,17 +683,51 @@ PacketStatus DAP::GetNextObject(llvm::json::Object &object) {
}
bool DAP::HandleObject(const llvm::json::Object &object) {
+ auto start_time = std::chrono::steady_clock::now();
const auto packet_type = GetString(object, "type");
if (packet_type == "request") {
const auto command = GetString(object, "command");
auto handler_pos = request_handlers.find(std::string(command));
+ lldb::SBStructuredData telemetry_entry;
+
+ // There does not seem to be a direct way to construct an SBStructuredData.
+ // So we first create a json::Array object,
+ // then we serialize it to a string,
+ // and finally call SBStructuredData::SetFromJSON(string).
+ //
+ // TODO: This seems unnecessarily complex. Ideally, we should be able to
----------------
oontvoo wrote:
@labath Hi Pavel, do you have any suggestion for avoiding this round-about?
https://github.com/llvm/llvm-project/pull/98528
More information about the llvm-commits
mailing list