(bucket: string, path?: string, region?: string, flushMs?: number)
| 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; |
nothing calls this directly
no outgoing calls
no test coverage detected