chore: ram vram usage in resource

This commit is contained in:
jialin
2025-03-06 19:44:35 +08:00
parent b0ac85d81d
commit 36d626c833
13 changed files with 137 additions and 90 deletions
+4 -1
View File
@@ -19,7 +19,10 @@ export const handleBatchRequest = async (
return Promise.all(list.map((item) => fn(item)));
};
export const convertFileSize = (sizeInBytes: number, prec?: number) => {
export const convertFileSize = (
sizeInBytes: number | undefined,
prec?: number
) => {
const precision = prec ?? 1;
if (!sizeInBytes) {
return '0';