Updated chart for mobile

This commit is contained in:
2025-12-28 03:51:13 +01:00
parent 471e731d2f
commit fd6742c7c5
4 changed files with 103 additions and 59 deletions
+1 -6
View File
@@ -2,12 +2,7 @@ import { NextRequest, NextResponse } from "next/server";
import testAuth from "../auth";
import { StatusCodes } from "http-status-codes";
import si from "systeminformation";
function average<T>(values: Array<T>, p: (v: T) => number) {
return values.length > 0
? values.reduce((sum, value) => sum + p(value), 0) / values.length
: 0;
}
import { average } from "@/lib/format";
type Usage = {
cpu: number;