feat(metrics): add real-time throughput sampling and byte-counting metrics
This commit is contained in:
@@ -89,7 +89,10 @@ export class RustMetricsAdapter implements IMetrics {
|
||||
};
|
||||
},
|
||||
recent: (): IThroughputData => {
|
||||
return this.throughput.instant();
|
||||
return {
|
||||
in: this.cache?.throughputRecentInBytesPerSec ?? 0,
|
||||
out: this.cache?.throughputRecentOutBytesPerSec ?? 0,
|
||||
};
|
||||
},
|
||||
average: (): IThroughputData => {
|
||||
return this.throughput.instant();
|
||||
|
||||
@@ -396,6 +396,7 @@ export class SmartProxy extends plugins.EventEmitter {
|
||||
extendedKeepAliveLifetime: this.settings.extendedKeepAliveLifetime,
|
||||
acceptProxyProtocol: this.settings.acceptProxyProtocol,
|
||||
sendProxyProtocol: this.settings.sendProxyProtocol,
|
||||
metrics: this.settings.metrics,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user