1
0
Fork 0
mirror of synced 2024-07-12 09:56:08 +12:00

usage test

This commit is contained in:
shimon 2023-01-15 12:25:03 +02:00
parent 44af561d06
commit a0554ca91e
4 changed files with 1 additions and 10 deletions

View file

@ -1009,7 +1009,6 @@ App::post('/v1/functions/:functionId/executions')
->addMetric('executions.compute', (int)($executionResponse['duration'] * 1000))// per project ->addMetric('executions.compute', (int)($executionResponse['duration'] * 1000))// per project
->addMetric("{$function->getInternalId()}" . ".executions.compute", (int)($executionResponse['duration'] * 1000))// per function ->addMetric("{$function->getInternalId()}" . ".executions.compute", (int)($executionResponse['duration'] * 1000))// per function
; ;
} catch (\Throwable $th) { } catch (\Throwable $th) {
$interval = (new \DateTime())->diff(new \DateTime($execution->getCreatedAt())); $interval = (new \DateTime())->diff(new \DateTime($execution->getCreatedAt()));
$execution $execution

View file

@ -44,7 +44,6 @@ class StorageConsoleClientTest extends Scope
$this->assertIsArray($response['body']['bucketsCount']); $this->assertIsArray($response['body']['bucketsCount']);
$this->assertIsArray($response['body']['filesCount']); $this->assertIsArray($response['body']['filesCount']);
$this->assertIsArray($response['body']['filesStorage']); $this->assertIsArray($response['body']['filesStorage']);
} }
public function testGetStorageBucketUsage() public function testGetStorageBucketUsage()

View file

@ -42,6 +42,5 @@ class UsersConsoleClientTest extends Scope
$this->assertEquals($response['body']['range'], '24h'); $this->assertEquals($response['body']['range'], '24h');
$this->assertIsArray($response['body']['usersCount']); $this->assertIsArray($response['body']['usersCount']);
$this->assertIsArray($response['body']['sessionsCount']); $this->assertIsArray($response['body']['sessionsCount']);
} }
} }

View file

@ -12,16 +12,10 @@ use Utopia\Queue\Connection;
class StatsTest extends TestCase class StatsTest extends TestCase
{ {
/**
* @var Connection
*/
protected ?Connection $connection = null; protected ?Connection $connection = null;
/**
* @var Client
*/
protected ?Client $client = null; protected ?Client $client = null;
const QUEUE_NAME = 'usage-test-q'; protected const QUEUE_NAME = 'usage-test-q';
public function setUp(): void public function setUp(): void
{ {