You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no way to detect run failures such as incompatible target platform.
Use case:
[Fact]publicvoidInProcessCannotRun(){varotherPlatform= IntPtr.Size ==8? Platform.X86
: Platform.X64;varotherPlatformConfig=new ManualConfig().With(Job.Dry.With(InProcessToolchain.Instance).WithInvocationCount(UnrollFactor).WithUnrollFactor(UnrollFactor).With(otherPlatform)).With(new OutputLogger(Output)).With(DefaultColumnProviders.Instance);varrunInfo= BenchmarkConverter.TypeToBenchmarks(typeof(BenchmarkAllCases), otherPlatformConfig);varsummary= BenchmarkRunner.Run(runInfo);// summary is empty; no way to detect from code what vent wrong;// output is:/* // Benchmark BenchmarkAllCases.InvokeOnceVoid: Dry(Platform=X86, Toolchain=InProcessToolchain, InvocationCount=16, IterationCount=1, LaunchCount=1, RunStrategy=ColdStart, UnrollFactor=16, WarmupCount=1) // cannot be run in-process. Validation errors: // * Job Dry, EnvironmentMode.Platform was run as X64 (X86 expected). Fix your test runner options. */// Workaround (not reliable)
Assert.Empty(summary.BenchmarksCases);return;}
Suggestions:
call the IToolchain.IsSupported method from validator and add the result into summary.ValidationErrors
add a property that indicates that benchmark completed without errors, summary.CompletedWithoutErrors or something like this.
The text was updated successfully, but these errors were encountered:
ig-sinicyn
changed the title
[Suggestion] add API for detecting cases where toolchain is not supported.
[Suggestion] add API for detecting benchmark run failures.
Dec 15, 2018
Currently, BenchmarkReport contains GenerateResult, BuildResult, and the list of result runs. I think we can introduce Status property which contains the final conclusion about benchmark status (including error text messages in case of any problems). In this case, we can implement an extension method for CompletedWithoutErrors based on the status values.
I've marked this issue as up-for-grabs. The contributor who is going to work on this should make sure that the errors are present in summary.ValidationErrors
There's no way to detect run failures such as incompatible target platform.
Use case:
Suggestions:
IToolchain.IsSupported
method from validator and add the result into summary.ValidationErrorssummary.CompletedWithoutErrors
or something like this.The text was updated successfully, but these errors were encountered: