mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 23:30:41 +09:00
Make metrics gathering timeout configurable
When reducing the collection interval in Prometheus it may be necessary to to reduce the metrics gathering timeout to ensure it's less than the interval. Add config options to adjust the timeouts used for metrics gathering so that these can be set accordingly.
This commit is contained in:
1 parent
699e3994df
commit
6eef4bd300
9 files changed
+63
-9
No files matched your search
+8
-3
@@ -103,11 +103,16 @@ class MockInstance extends libLink.Link {
|
||||
this.logger = new MockLogger();
|
||||
this.server = new MockServer();
|
||||
this.name = "test";
|
||||
this.mockConfigEntries = new Map([
|
||||
["instance.id", 7357],
|
||||
["factorio.enable_save_patching", true],
|
||||
]);
|
||||
this.config = {
|
||||
get: (name) => {
|
||||
if (name === "instance.id") { return 7357; }
|
||||
if (name === "factorio.enable_save_patching") { return true; }
|
||||
throw Error("Not implemented");
|
||||
if (this.mockConfigEntries.has(name)) {
|
||||
return this.mockConfigEntries.get(name);
|
||||
}
|
||||
throw Error(`mock for field ${name} is not implemented`);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user