1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

organize metrics

This commit is contained in:
Damodar Lohani 2022-08-13 05:00:22 +00:00
parent 02074a93ef
commit 85f39ec0ef

View file

@ -278,11 +278,11 @@ App::get('/v1/projects/:projectId/usage')
$metrics = [
'project.$all.network.requests',
'project.$all.network.bandwidth',
'executions.$all.compute.total',
'project.$all.storage.size',
'users.$all.count.total',
'documents.$all.count.total',
'collections.$all.count.total',
'project.$all.storage.size'
'documents.$all.count.total',
'executions.$all.compute.total',
];
$stats = [];
@ -327,11 +327,11 @@ App::get('/v1/projects/:projectId/usage')
'range' => $range,
'requests' => $stats[$metrics[0]],
'network' => $stats[$metrics[1]],
'executions' => $stats[$metrics[2]],
'storage' => $stats[$metrics[2]],
'users' => $stats[$metrics[3]],
'documents' => $stats[$metrics[4]],
'collections' => $stats[$metrics[5]],
'storage' => $stats[$metrics[6]],
'collections' => $stats[$metrics[4]],
'documents' => $stats[$metrics[5]],
'executions' => $stats[$metrics[6]],
]);
}