Gatus seems to have changed the duration format from us to ns

This commit is contained in:
M
2025-10-07 09:30:37 +02:00
committed by Bastien Wirtz
parent 184c16d46c
commit 62606e0caf
2 changed files with 13 additions and 13 deletions

View File

@@ -7,7 +7,7 @@
{ {
"status": 200, "status": 200,
"hostname": "gateway.example.com", "hostname": "gateway.example.com",
"duration": 10000, "duration": 10000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -24,7 +24,7 @@
{ {
"status": 200, "status": 200,
"hostname": "gateway.example.com", "hostname": "gateway.example.com",
"duration": 10000, "duration": 10000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -41,7 +41,7 @@
{ {
"status": 200, "status": 200,
"hostname": "gateway.example.com", "hostname": "gateway.example.com",
"duration": 10000, "duration": 10000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -58,7 +58,7 @@
{ {
"status": 200, "status": 200,
"hostname": "gateway.example.com", "hostname": "gateway.example.com",
"duration": 10000, "duration": 10000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -82,7 +82,7 @@
{ {
"status": 200, "status": 200,
"hostname": "www.example.com", "hostname": "www.example.com",
"duration": 10000, "duration": 10000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -99,7 +99,7 @@
{ {
"status": 200, "status": 200,
"hostname": "gateway.example.com", "hostname": "gateway.example.com",
"duration": 10000, "duration": 10000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -116,7 +116,7 @@
{ {
"status": 200, "status": 200,
"hostname": "gateway.example.com", "hostname": "gateway.example.com",
"duration": 10000, "duration": 10000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -133,7 +133,7 @@
{ {
"status": 200, "status": 200,
"hostname": "gateway.example.com", "hostname": "gateway.example.com",
"duration": 10000, "duration": 10000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -157,7 +157,7 @@
{ {
"status": 200, "status": 200,
"hostname": "ns1.example", "hostname": "ns1.example",
"duration": 20000, "duration": 20000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -170,7 +170,7 @@
{ {
"status": 200, "status": 200,
"hostname": "ns1.example.com", "hostname": "ns1.example.com",
"duration": 20000, "duration": 20000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -183,7 +183,7 @@
{ {
"status": 200, "status": 200,
"hostname": "ns1.example.com", "hostname": "ns1.example.com",
"duration": 20000, "duration": 20000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",
@@ -196,7 +196,7 @@
{ {
"status": 200, "status": 200,
"hostname": "ns1.example.com", "hostname": "ns1.example.com",
"duration": 20000, "duration": 20000000,
"conditionResults": [ "conditionResults": [
{ {
"condition": "[STATUS] == 200", "condition": "[STATUS] == 200",

View File

@@ -74,7 +74,7 @@ export default {
let totalduration = 0; let totalduration = 0;
let rescounter = 0; let rescounter = 0;
job.results.forEach((res) => { job.results.forEach((res) => {
totalduration += parseInt(res.duration, 10) / 1000; totalduration += parseInt(res.duration, 10) / 1000000;
rescounter++; rescounter++;
}) })