We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4049f6f commit 2945400Copy full SHA for 2945400
src/Log/Prometheus.php
@@ -101,7 +101,7 @@ public function onPhpbuEnd(End $event)
101
$this->write('# HELP phpbu_backup_duration The total time the backup took to execute' . PHP_EOL);
102
$this->write('# TYPE phpbu_backup_duration gauge' . PHP_EOL);
103
foreach ($this->backupStats as $backupName => $backupStats) {
104
- $duration = $this->backupStats[$backupName]['timeEnd'] - $this->backupStats[$backupName]['timeStart'];
+ $duration = abs($this->backupStats[$backupName]['timeEnd'] - $this->backupStats[$backupName]['timeStart']);
105
$this->write('phpbu_backup_duration{name="' . $backupName . '"} ' . $duration . PHP_EOL);
106
}
107
0 commit comments