1
0
Fork 0
mirror of synced 2024-07-08 16:06:02 +12:00

usage test

This commit is contained in:
shimon 2023-01-12 19:41:14 +02:00
parent 9a2f734d3a
commit b61e6e0d5a
2 changed files with 18 additions and 2 deletions

View file

@ -61,6 +61,7 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools
'value' => ($collections['value'] * -1), 'value' => ($collections['value'] * -1),
]; ];
} }
if (!empty($documents['value'])) { if (!empty($documents['value'])) {
$metrics[] = [ $metrics[] = [
'key' => 'documents', 'key' => 'documents',
@ -94,6 +95,9 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools
'key' => 'files', 'key' => 'files',
'value' => ($files['value'] * -1), 'value' => ($files['value'] * -1),
]; ];
}
if (!empty($storage['value'])) {
$metrics[] = [ $metrics[] = [
'key' => 'files.storage', 'key' => 'files.storage',
'value' => ($storage['value'] * -1), 'value' => ($storage['value'] * -1),
@ -115,6 +119,9 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools
'key' => 'deployments', 'key' => 'deployments',
'value' => ($deployments['value'] * -1), 'value' => ($deployments['value'] * -1),
]; ];
}
if (!empty($deploymentsStorage['value'])) {
$metrics[] = [ $metrics[] = [
'key' => 'deployments.storage', 'key' => 'deployments.storage',
'value' => ($deploymentsStorage['value'] * -1), 'value' => ($deploymentsStorage['value'] * -1),
@ -126,10 +133,16 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools
'key' => 'builds', 'key' => 'builds',
'value' => ($builds['value'] * -1), 'value' => ($builds['value'] * -1),
]; ];
}
if (!empty($buildsStorage['value'])) {
$metrics[] = [ $metrics[] = [
'key' => 'builds.storage', 'key' => 'builds.storage',
'value' => ($buildsStorage['value'] * -1), 'value' => ($buildsStorage['value'] * -1),
]; ];
}
if (!empty($buildsCompute['value'])) {
$metrics[] = [ $metrics[] = [
'key' => 'builds.compute', 'key' => 'builds.compute',
'value' => ($buildsCompute['value'] * -1), 'value' => ($buildsCompute['value'] * -1),
@ -139,8 +152,11 @@ Server::setResource('reduce', function (Cache $cache, Registry $register, $pools
if (!empty($executions['value'])) { if (!empty($executions['value'])) {
$metrics[] = [ $metrics[] = [
'key' => 'executions', 'key' => 'executions',
'value' => ($executions['value'] * -1), 'value' => ($executionsCompute['value'] * -1),
]; ];
}
if (!empty($executionsCompute['value'])) {
$metrics[] = [ $metrics[] = [
'key' => 'executions.compute', 'key' => 'executions.compute',
'value' => ($executionsCompute['value'] * -1), 'value' => ($executionsCompute['value'] * -1),

View file

@ -18,7 +18,7 @@ class UsageTest extends Scope
use SideServer; use SideServer;
use FunctionsBase; use FunctionsBase;
private const WAIT = 30; private const WAIT = 35;
private const CREATE = 20; private const CREATE = 20;
protected string $projectId; protected string $projectId;