(state: SampleState, metricValues: {[key: string]: any})
| 84 | } |
| 85 | |
| 86 | private _report(state: SampleState, metricValues: {[key: string]: any}): Promise<SampleState> { |
| 87 | const measureValues = new MeasureValues(state.completeSample.length, this._now(), metricValues); |
| 88 | const completeSample = state.completeSample.concat([measureValues]); |
| 89 | const validSample = this._validator.validate(completeSample); |
| 90 | let resultPromise = this._reporter.reportMeasureValues(measureValues); |
| 91 | if (validSample != null) { |
| 92 | resultPromise = resultPromise.then((_) => |
| 93 | this._reporter.reportSample(completeSample, validSample), |
| 94 | ); |
| 95 | } |
| 96 | return resultPromise.then((_) => new SampleState(completeSample, validSample)); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | export class SampleState { |
no test coverage detected