Sort indexer queries stats by a sum of all 3 types

pull/2184/head
Bogdan 9 months ago
parent 4c99971882
commit 5464b23329

@ -46,6 +46,10 @@ class StackedBarChart extends Component {
size: 14,
family: defaultFontFamily
}
},
tooltip: {
mode: 'index',
position: 'average'
}
}
},

@ -73,10 +73,12 @@ function getFailureRateData(indexerStats: IndexerStatsIndexer[]) {
}
function getTotalRequestsData(indexerStats: IndexerStatsIndexer[]) {
const statistics = [...indexerStats].sort((a, b) =>
a.numberOfQueries === b.numberOfQueries
? b.numberOfRssQueries - a.numberOfRssQueries
: b.numberOfQueries - a.numberOfQueries
const statistics = [...indexerStats].sort(
(a, b) =>
b.numberOfQueries +
b.numberOfRssQueries +
b.numberOfAuthQueries -
(a.numberOfQueries + a.numberOfRssQueries + a.numberOfAuthQueries)
);
return {

Loading…
Cancel
Save