Skip to content

Commit

Permalink
fix: Add buckets to histograms (#144)
Browse files Browse the repository at this point in the history
This ads predefined buckets to histograms to reduce the amount of permutations in the metrics.

Co-authored-by: Trygve Lie <trygve.lie@finn.no>
  • Loading branch information
trygve-lie and Trygve Lie committed Jul 1, 2020
1 parent 692c2f3 commit bed07bd
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/handlers/alias.delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ const AliasDel = class AliasDel {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);
}
Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/alias.get.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ const AliasGet = class AliasGet {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);
}
Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/alias.post.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ const AliasPost = class AliasPost {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);

Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/alias.put.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ const AliasPut = class AliasPut {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);

Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/auth.post.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ const AuthPost = class AuthPost {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);

Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/map.get.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ const MapGet = class MapGet {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);
}
Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/map.put.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ const MapPut = class MapPut {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);
}
Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/pkg.get.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ const PkgGet = class PkgGet {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);
}
Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/pkg.log.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ const PkgLog = class PkgLog {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);
}
Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/pkg.put.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ const PkgPut = class PkgPut {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);

Expand Down
10 changes: 10 additions & 0 deletions lib/handlers/versions.get.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ const VersionsGet = class VersionsGet {
labels: {
success: true,
},
buckets: [
0.005,
0.01,
0.06,
0.1,
0.6,
1.0,
2.0,
4.0,
],
});
this._orgRegistry = new Map(this._organizations);
}
Expand Down

0 comments on commit bed07bd

Please sign in to comment.