test1 successful
This commit is contained in:
@@ -91,6 +91,61 @@ export class InfluxMetricsProvider implements IMetricsProvider {
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordQueueDepth(depth: number): void {
|
||||
const p = new Point('queue_depth').intField('depth', depth);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordQueueRetries(retries: number, signature: string): void {
|
||||
const p = new Point('queue_retries').tag('signature', signature).intField('retries', retries);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordQueue429s(signature: string): void {
|
||||
const p = new Point('queue_429s').tag('signature', signature).intField('count', 1);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordWalletEventReceived(wallet: string): void {
|
||||
const p = new Point('wallet_event_received').tag('wallet', wallet).intField('count', 1);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordWalletQueueDepth(wallet: string, depth: number): void {
|
||||
const p = new Point('wallet_queue_depth').tag('wallet', wallet).intField('depth', depth);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordOldestQueuedAge(wallet: string, ageMs: number): void {
|
||||
const p = new Point('oldest_queued_age').tag('wallet', wallet).floatField('age_ms', ageMs);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordDroppedOldestCount(wallet: string): void {
|
||||
const p = new Point('dropped_oldest_count').tag('wallet', wallet).intField('count', 1);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordTransactionRelevance(relevant: boolean): void {
|
||||
const p = new Point('transaction_relevance').tag('relevant', String(relevant)).intField('count', 1);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordRpcRequestRate(requestsPerSecond: number): void {
|
||||
const p = new Point('rpc_request_rate').floatField('req_per_sec', requestsPerSecond);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordQueueProcessed(wallet: string): void {
|
||||
const p = new Point('queue_processed').tag('wallet', wallet).intField('count', 1);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
recordRpcFetchError(wallet: string): void {
|
||||
const p = new Point('rpc_fetch_error').tag('wallet', wallet).intField('count', 1);
|
||||
this.writePoint(p);
|
||||
}
|
||||
|
||||
async close(): Promise<void> {
|
||||
if (this.writeApi) {
|
||||
logger.info('Closing InfluxDB metrics writer...');
|
||||
@@ -114,4 +169,15 @@ export class MockMetricsProvider implements IMetricsProvider {
|
||||
recordPortfolioBalance(_balanceSol: number, _scenario: number): void {}
|
||||
recordTradePnl(_pnlSol: number, _scenario: number, _tokenMint: string): void {}
|
||||
recordExcursion(_mfeSol: number, _maeSol: number, _scenario: number, _tokenMint: string): void {}
|
||||
recordQueueDepth(_depth: number): void {}
|
||||
recordQueueRetries(_retries: number, _signature: string): void {}
|
||||
recordQueue429s(_signature: string): void {}
|
||||
recordWalletEventReceived(_wallet: string): void {}
|
||||
recordWalletQueueDepth(_wallet: string, _depth: number): void {}
|
||||
recordOldestQueuedAge(_wallet: string, _ageMs: number): void {}
|
||||
recordDroppedOldestCount(_wallet: string): void {}
|
||||
recordTransactionRelevance(_relevant: boolean): void {}
|
||||
recordRpcRequestRate(_requestsPerSecond: number): void {}
|
||||
recordQueueProcessed(_wallet: string): void {}
|
||||
recordRpcFetchError(_wallet: string): void {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user