Skip to content

Commit 64a07d9

Browse files
authored
Merge pull request #70 from WoWAnalyzer/push-uwvusokmwozl
remove median calculation from server metrics, increase cache time
2 parents a79f15c + 81d87cf commit 64a07d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/route/metrics.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const serverMetrics: FastifyPluginAsync = async (app) => {
2929
async () => {
3030
const data = await db.query(
3131
`
32-
select configName, metricId, min(metricValue) as minValue, median(metricValue) over (partition by configName, metricId) as medValue, avg(metricValue) as avgValue, max(metricValue) as \`maxValue\`
32+
select configName, metricId, min(metricValue) as minValue, avg(metricValue) as avgValue, max(metricValue) as \`maxValue\`
3333
from spec_analysis_metric_key as k
3434
join spec_analysis_metric_data data on data.keyId = k.id
3535
where k.analysisTimestamp >= now() - interval 2 week
@@ -42,7 +42,7 @@ const serverMetrics: FastifyPluginAsync = async (app) => {
4242
metricId: METRIC_NAMES_BY_ID[v.metricId as number],
4343
}));
4444
},
45-
60,
45+
600,
4646
);
4747

4848
return reply.header("content-type", "application/json").send(data);

0 commit comments

Comments
 (0)