ignore latency mismatches
This commit is contained in:
@@ -19,6 +19,7 @@ const config = {
|
|||||||
// Logging
|
// Logging
|
||||||
logMismatches: process.env.LOG_MISMATCHES !== 'false', // default true
|
logMismatches: process.env.LOG_MISMATCHES !== 'false', // default true
|
||||||
logAllMismatchedResponses: process.env.LOG_ALL_MISMATCHED_RESPONSES === 'true', // default false
|
logAllMismatchedResponses: process.env.LOG_ALL_MISMATCHED_RESPONSES === 'true', // default false
|
||||||
|
ignoreLatencyMismatches: process.env.IGNORE_LATENCY_MISMATCHES === 'true', // default false
|
||||||
|
|
||||||
// Server
|
// Server
|
||||||
port: parseInt(process.env.PORT || '8545', 10),
|
port: parseInt(process.env.PORT || '8545', 10),
|
||||||
|
|||||||
@@ -732,7 +732,7 @@ class RPCProxy {
|
|||||||
|
|
||||||
// Check latency difference
|
// Check latency difference
|
||||||
const latencyDiff = compareResponse.latency - streamResponse.latency;
|
const latencyDiff = compareResponse.latency - streamResponse.latency;
|
||||||
if (latencyDiff > config.latencyThresholdMs) {
|
if (!config.ignoreLatencyMismatches && latencyDiff > config.latencyThresholdMs) {
|
||||||
mismatches.push({
|
mismatches.push({
|
||||||
type: 'latency',
|
type: 'latency',
|
||||||
streamLatency: streamResponse.latency,
|
streamLatency: streamResponse.latency,
|
||||||
|
|||||||
Reference in New Issue
Block a user