diff options
author | Yabin Cui <yabinc@google.com> | 2024-02-06 12:21:54 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2024-02-06 12:21:54 -0800 |
commit | 52abb84e33123157347e3b05172f8372f4c4a09d (patch) | |
tree | 8660a5aff6355ee4dd54a648fbbd7ed0c4ac3174 /simpleperf | |
parent | 38fabf944b0c36349d2a456e09e4e6a790ceb0ae (diff) | |
download | extras-52abb84e33123157347e3b05172f8372f4c4a09d.tar.gz |
simpleperf: report_html.py: disable sorting in ascending order for Total, Self, Samples
It's unlikely that users want to sort these columns in ascending order.
After disabling ascending order, when a user clicks one of these
columns, the column is always sorted in descending order.
Also sort these columns in descending order by default.
Bug: 322228090
Test: run report_html.py
Change-Id: I7b8a7a36f107ef6d935e71cbbd713426d4b1bec8
Diffstat (limited to 'simpleperf')
-rw-r--r-- | simpleperf/scripts/report_html.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/simpleperf/scripts/report_html.js b/simpleperf/scripts/report_html.js index 17f780fe..94e8ae5c 100644 --- a/simpleperf/scripts/report_html.js +++ b/simpleperf/scripts/report_html.js @@ -702,9 +702,12 @@ class SampleTableView { let dataTable = table.DataTable({ lengthMenu: [10, 20, 50, 100, -1], pageLength: 100, - order: [0, 'desc'], + order: [[0, 'desc'], [1, 'desc'], [2, 'desc']], data: data, responsive: true, + columnDefs: [ + { orderSequence: [ 'desc' ], targets: [0, 1, 2] }, + ], }); dataTable.column(7).visible(false); |