From 9ae70393b55842a50f75743780c4cb7d66500a7d Mon Sep 17 00:00:00 2001 From: "Wimalasuriyan, Sajeeth" Date: Fri, 27 Feb 2026 22:28:15 -0500 Subject: [PATCH 1/2] Added metric ID column, description tooltip on hover, and right-click copy support to the compute table view. --- .../src/widgets/rocprofvis_compute_widget.cpp | 36 +++++++++++++++---- .../src/widgets/rocprofvis_compute_widget.h | 6 ++-- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/view/src/widgets/rocprofvis_compute_widget.cpp b/src/view/src/widgets/rocprofvis_compute_widget.cpp index b3aa1f21..8072bd71 100644 --- a/src/view/src/widgets/rocprofvis_compute_widget.cpp +++ b/src/view/src/widgets/rocprofvis_compute_widget.cpp @@ -385,6 +385,7 @@ MetricTableCache::Populate(const AvailableMetrics::Table& table, m_rows.clear(); m_rows.reserve(table.entries.size()); + m_column_names.push_back("Metric ID"); m_column_names.push_back("Metric"); if(table.value_names.empty()) { @@ -404,8 +405,12 @@ MetricTableCache::Populate(const AvailableMetrics::Table& table, const auto& entry = entry_pair.second; Row row; - row.name = entry.name; - row.unit = entry.unit.empty() ? "N/A" : entry.unit; + row.metric_id = std::to_string(entry.category_id) + "." + + std::to_string(entry.table_id) + "." + + std::to_string(eid); + row.name = entry.name; + row.description = entry.description; + row.unit = entry.unit.empty() ? "N/A" : entry.unit; auto mv = get_value(eid); @@ -457,18 +462,32 @@ MetricTableCache::Render() const ImGui::TableSetupColumn(col.c_str()); ImGui::TableHeadersRow(); + int row_idx = 0; for(const auto& row : m_rows) { + ImGui::PushID(row_idx++); ImGui::TableNextRow(); + ImGui::TableNextColumn(); - ImGui::TextUnformatted(row.name.c_str()); + CopyableTextUnformatted(row.metric_id.c_str(), "##mid", + COPY_DATA_NOTIFICATION, false, true); - for(const auto& val : row.values) + ImGui::TableNextColumn(); + CopyableTextUnformatted(row.name.c_str(), "##name", + COPY_DATA_NOTIFICATION, false, true); + if(!row.description.empty() && ImGui::IsItemHovered()) + { + ImGui::SetTooltip("%s", row.description.c_str()); + } + + for(int vi = 0; vi < static_cast(row.values.size()); vi++) { ImGui::TableNextColumn(); - if(!val.empty()) + if(!row.values[vi].empty()) { - ImGui::TextUnformatted(val.c_str()); + CopyableTextUnformatted(row.values[vi].c_str(), + std::string("##v") + std::to_string(vi), + COPY_DATA_NOTIFICATION, false, true); } else { @@ -479,12 +498,15 @@ MetricTableCache::Render() const ImGui::TableNextColumn(); if(row.unit != "N/A") { - ImGui::TextUnformatted(row.unit.c_str()); + CopyableTextUnformatted(row.unit.c_str(), "##unit", + COPY_DATA_NOTIFICATION, false, true); } else { ImGui::TextDisabled("N/A"); } + + ImGui::PopID(); } ImGui::EndTable(); } diff --git a/src/view/src/widgets/rocprofvis_compute_widget.h b/src/view/src/widgets/rocprofvis_compute_widget.h index 8efa4ca8..eac2edc0 100644 --- a/src/view/src/widgets/rocprofvis_compute_widget.h +++ b/src/view/src/widgets/rocprofvis_compute_widget.h @@ -109,8 +109,10 @@ class MetricTableCache struct Row { - std::string name; - std::vector values; + std::string metric_id; + std::string name; + std::string description; + std::vector values; std::string unit; }; From 3fcf230446c7c3b308ee83f623ca1a51ce578eb9 Mon Sep 17 00:00:00 2001 From: "Wimalasuriyan, Sajeeth" Date: Sun, 1 Mar 2026 23:15:04 -0500 Subject: [PATCH 2/2] Cleaned up tooltip and made it look less ugly by enabling overflow. --- src/view/src/widgets/rocprofvis_compute_widget.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/view/src/widgets/rocprofvis_compute_widget.cpp b/src/view/src/widgets/rocprofvis_compute_widget.cpp index 8072bd71..390cdfb6 100644 --- a/src/view/src/widgets/rocprofvis_compute_widget.cpp +++ b/src/view/src/widgets/rocprofvis_compute_widget.cpp @@ -5,6 +5,7 @@ #include "compute/rocprofvis_compute_selection.h" #include "rocprofvis_core_assert.h" #include "rocprofvis_data_provider.h" +#include "rocprofvis_gui_helpers.h" #include "rocprofvis_requests.h" #include "implot.h" #include @@ -477,7 +478,14 @@ MetricTableCache::Render() const COPY_DATA_NOTIFICATION, false, true); if(!row.description.empty() && ImGui::IsItemHovered()) { - ImGui::SetTooltip("%s", row.description.c_str()); + constexpr float kTooltipMaxWidth = 400.0f; + ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), + ImVec2(kTooltipMaxWidth, FLT_MAX)); + BeginTooltipStyled(); + ImGui::PushTextWrapPos(ImGui::GetCursorPosX() + kTooltipMaxWidth); + ImGui::TextUnformatted(row.description.c_str()); + ImGui::PopTextWrapPos(); + EndTooltipStyled(); } for(int vi = 0; vi < static_cast(row.values.size()); vi++)