|
|
|
@ -54,7 +54,8 @@ function getAverageResponseTimeData(indexerStats: IndexerStatsIndexer[]) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getFailureRateData(indexerStats: IndexerStatsIndexer[]) {
|
|
|
|
|
const data = indexerStats.map((indexer) => ({
|
|
|
|
|
const data = [...indexerStats]
|
|
|
|
|
.map((indexer) => ({
|
|
|
|
|
label: indexer.indexerName,
|
|
|
|
|
value:
|
|
|
|
|
(indexer.numberOfFailedQueries +
|
|
|
|
@ -65,7 +66,8 @@ function getFailureRateData(indexerStats: IndexerStatsIndexer[]) {
|
|
|
|
|
indexer.numberOfRssQueries +
|
|
|
|
|
indexer.numberOfAuthQueries +
|
|
|
|
|
indexer.numberOfGrabs),
|
|
|
|
|
}));
|
|
|
|
|
}))
|
|
|
|
|
.filter((s) => s.value > 0);
|
|
|
|
|
|
|
|
|
|
data.sort((a, b) => b.value - a.value);
|
|
|
|
|
|
|
|
|
@ -73,7 +75,14 @@ function getFailureRateData(indexerStats: IndexerStatsIndexer[]) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getTotalRequestsData(indexerStats: IndexerStatsIndexer[]) {
|
|
|
|
|
const statistics = [...indexerStats].sort(
|
|
|
|
|
const statistics = [...indexerStats]
|
|
|
|
|
.filter(
|
|
|
|
|
(s) =>
|
|
|
|
|
s.numberOfQueries > 0 ||
|
|
|
|
|
s.numberOfRssQueries > 0 ||
|
|
|
|
|
s.numberOfAuthQueries > 0
|
|
|
|
|
)
|
|
|
|
|
.sort(
|
|
|
|
|
(a, b) =>
|
|
|
|
|
b.numberOfQueries +
|
|
|
|
|
b.numberOfRssQueries +
|
|
|
|
@ -101,10 +110,12 @@ function getTotalRequestsData(indexerStats: IndexerStatsIndexer[]) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getNumberGrabsData(indexerStats: IndexerStatsIndexer[]) {
|
|
|
|
|
const data = indexerStats.map((indexer) => ({
|
|
|
|
|
const data = [...indexerStats]
|
|
|
|
|
.map((indexer) => ({
|
|
|
|
|
label: indexer.indexerName,
|
|
|
|
|
value: indexer.numberOfGrabs - indexer.numberOfFailedGrabs,
|
|
|
|
|
}));
|
|
|
|
|
}))
|
|
|
|
|
.filter((s) => s.value > 0);
|
|
|
|
|
|
|
|
|
|
data.sort((a, b) => b.value - a.value);
|
|
|
|
|
|
|
|
|
|