mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
new stats and lints
This commit is contained in:
parent
71c8c8a72e
commit
79936b88d0
3 changed files with 8 additions and 8 deletions
|
|
@ -111,12 +111,12 @@ class Stats
|
|||
$this->statsd->increment('functions.executions.all' . $tags . ',functionId=' . $functionId . ',functionStatus=' . $functionStatus);
|
||||
$this->statsd->count('functions.executions.time' . $tags . ',functionId=' . $functionId, $functionExecutionTime);
|
||||
}
|
||||
if($functionBuild >= 1) {
|
||||
if ($functionBuild >= 1) {
|
||||
$this->statsd->increment('functions.builds.all' . $tags . ',functionId=' . $functionId . ',functionBuildStatus=' . $functionBuildStatus);
|
||||
$this->statsd->count('functions.builds.time' . $tags . ',functionId=' . $functionId, $functionExecutionTime);
|
||||
}
|
||||
if($functionBuild + $functionExecution >= 1) {
|
||||
$this->statsd->count('functions.compute.time' . $tags. ',functionId=' . $functionId, $functionCompute);
|
||||
if ($functionBuild + $functionExecution >= 1) {
|
||||
$this->statsd->count('functions.compute.time' . $tags . ',functionId=' . $functionId, $functionCompute);
|
||||
}
|
||||
|
||||
$this->statsd->count('network.inbound' . $tags, $networkRequestSize);
|
||||
|
|
|
|||
|
|
@ -197,14 +197,14 @@ class Usage
|
|||
'table' => 'appwrite_usage_functions_compute_time',
|
||||
'groupBy' => ['functionId'],
|
||||
],
|
||||
'functions.functionId.failures' => [
|
||||
'functions.functionId.executions.failures' => [
|
||||
'table' => 'appwrite_usage_functions_executions_all',
|
||||
'groupBy' => ['functionId'],
|
||||
'filters' => [
|
||||
'functionStatus' => 'failed',
|
||||
],
|
||||
],
|
||||
'functions.functionId.builds' => [
|
||||
'functions.functionId.builds.failures' => [
|
||||
'table' => 'appwrite_usage_functions_builds_all',
|
||||
'groupBy' => ['functionId'],
|
||||
'filters' => [
|
||||
|
|
|
|||
|
|
@ -231,10 +231,10 @@ class UsageDB extends Usage
|
|||
*/
|
||||
private function computeStats(string $projectId): void
|
||||
{
|
||||
$executionTotal = $this->sum($projectId, 'executions', 'time', 'functions.executionTime.total');
|
||||
$buildTotal = $this->sum($projectId, 'builds', 'duration', 'functions.buildTime.total');
|
||||
$executionTotal = $this->sum($projectId, 'executions', 'time', 'functions.executionTime');
|
||||
$buildTotal = $this->sum($projectId, 'builds', 'duration', 'functions.buildTime');
|
||||
|
||||
$this->createOrUpdateMetric($projectId, 'functions.compute.total', $executionTotal + $buildTotal);
|
||||
$this->createOrUpdateMetric($projectId, 'functions.compute', $executionTotal + $buildTotal);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue