MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

lib/stats.ts:131–138  ·  view source on GitHub ↗
(bucket: string, path?: string, region?: string, flushMs?: number)

Source from the content-addressed store, hash-verified

129 private readonly _path: string;
130
131 constructor(bucket: string, path?: string, region?: string, flushMs?: number) {
132 this._statsQueue = [];
133 this._flushAfterMs = flushMs ?? 5 * 60 * 1000;
134 this._flushJob = undefined;
135 this._s3 = new S3Bucket(bucket, region ?? 'us-east-1');
136 this._path = path ?? 'compile-stats';
137 logger.info(`Flushing stats to ${bucket}/${this._path} every ${formatMs(this._flushAfterMs)}`);
138 }
139
140 private flush() {
141 const toFlush = this._statsQueue;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected