Skip to content

Commit 62606e0

Browse files
migglandbastienwirtz
authored andcommitted
Gatus seems to have changed the duration format from us to ns
1 parent 184c16d commit 62606e0

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

dummy-data/gatus/api/v1/endpoints/statuses

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"status": 200,
99
"hostname": "gateway.example.com",
10-
"duration": 10000,
10+
"duration": 10000000,
1111
"conditionResults": [
1212
{
1313
"condition": "[STATUS] == 200",
@@ -24,7 +24,7 @@
2424
{
2525
"status": 200,
2626
"hostname": "gateway.example.com",
27-
"duration": 10000,
27+
"duration": 10000000,
2828
"conditionResults": [
2929
{
3030
"condition": "[STATUS] == 200",
@@ -41,7 +41,7 @@
4141
{
4242
"status": 200,
4343
"hostname": "gateway.example.com",
44-
"duration": 10000,
44+
"duration": 10000000,
4545
"conditionResults": [
4646
{
4747
"condition": "[STATUS] == 200",
@@ -58,7 +58,7 @@
5858
{
5959
"status": 200,
6060
"hostname": "gateway.example.com",
61-
"duration": 10000,
61+
"duration": 10000000,
6262
"conditionResults": [
6363
{
6464
"condition": "[STATUS] == 200",
@@ -82,7 +82,7 @@
8282
{
8383
"status": 200,
8484
"hostname": "www.example.com",
85-
"duration": 10000,
85+
"duration": 10000000,
8686
"conditionResults": [
8787
{
8888
"condition": "[STATUS] == 200",
@@ -99,7 +99,7 @@
9999
{
100100
"status": 200,
101101
"hostname": "gateway.example.com",
102-
"duration": 10000,
102+
"duration": 10000000,
103103
"conditionResults": [
104104
{
105105
"condition": "[STATUS] == 200",
@@ -116,7 +116,7 @@
116116
{
117117
"status": 200,
118118
"hostname": "gateway.example.com",
119-
"duration": 10000,
119+
"duration": 10000000,
120120
"conditionResults": [
121121
{
122122
"condition": "[STATUS] == 200",
@@ -133,7 +133,7 @@
133133
{
134134
"status": 200,
135135
"hostname": "gateway.example.com",
136-
"duration": 10000,
136+
"duration": 10000000,
137137
"conditionResults": [
138138
{
139139
"condition": "[STATUS] == 200",
@@ -157,7 +157,7 @@
157157
{
158158
"status": 200,
159159
"hostname": "ns1.example",
160-
"duration": 20000,
160+
"duration": 20000000,
161161
"conditionResults": [
162162
{
163163
"condition": "[STATUS] == 200",
@@ -170,7 +170,7 @@
170170
{
171171
"status": 200,
172172
"hostname": "ns1.example.com",
173-
"duration": 20000,
173+
"duration": 20000000,
174174
"conditionResults": [
175175
{
176176
"condition": "[STATUS] == 200",
@@ -183,7 +183,7 @@
183183
{
184184
"status": 200,
185185
"hostname": "ns1.example.com",
186-
"duration": 20000,
186+
"duration": 20000000,
187187
"conditionResults": [
188188
{
189189
"condition": "[STATUS] == 200",
@@ -196,7 +196,7 @@
196196
{
197197
"status": 200,
198198
"hostname": "ns1.example.com",
199-
"duration": 20000,
199+
"duration": 20000000,
200200
"conditionResults": [
201201
{
202202
"condition": "[STATUS] == 200",

src/components/services/Gatus.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default {
7474
let totalduration = 0;
7575
let rescounter = 0;
7676
job.results.forEach((res) => {
77-
totalduration += parseInt(res.duration, 10) / 1000;
77+
totalduration += parseInt(res.duration, 10) / 1000000;
7878
rescounter++;
7979
})
8080

0 commit comments

Comments
 (0)