We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7532a5c commit baf9e4fCopy full SHA for baf9e4f
resources/benchmark.ts
@@ -122,9 +122,12 @@ function collectSamples(modulePath: string) {
122
123
if (sample.involuntaryContextSwitches > 0) {
124
numOfConsequentlyRejectedSamples++;
125
- if (numOfConsequentlyRejectedSamples > 5) {
126
- throw Error(
127
- 'Can not sample benchmark due to 5 consequent runs beings rejected because of context switching',
+ if (numOfConsequentlyRejectedSamples === 5) {
+ console.error(
+ yellow(
128
+ ' Five or more consequent runs beings rejected because of context switching.\n' +
129
+ ' Measurement can take a significantly longer time and its correctness can also be impacted.',
130
+ ),
131
);
132
}
133
continue;
0 commit comments