File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed
src/Microsoft.ComponentDetection.Orchestrator Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ namespace Microsoft . ComponentDetection . Orchestrator . Experiments . Configs ;
2+
3+ using Microsoft . ComponentDetection . Contracts ;
4+ using Microsoft . ComponentDetection . Detectors . Rust ;
5+
6+ /// <summary>
7+ /// Validating the Rust SBOM detector against the Rust CLI detector.
8+ /// </summary>
9+ public class RustSbomVsCliExperiment : IExperimentConfiguration
10+ {
11+ /// <inheritdoc />
12+ public string Name => "RustSbomVsCliExperiment" ;
13+
14+ /// <inheritdoc/>
15+ public bool IsInControlGroup ( IComponentDetector componentDetector ) => componentDetector is RustCliDetector ;
16+
17+ /// <inheritdoc/>
18+ public bool IsInExperimentGroup ( IComponentDetector componentDetector ) => componentDetector is RustSbomDetector ;
19+
20+ /// <inheritdoc />
21+ public bool ShouldRecord ( IComponentDetector componentDetector , int numComponents ) => true ;
22+ }
Original file line number Diff line number Diff line change 1+ namespace Microsoft . ComponentDetection . Orchestrator . Experiments . Configs ;
2+
3+ using Microsoft . ComponentDetection . Contracts ;
4+ using Microsoft . ComponentDetection . Detectors . Rust ;
5+
6+ /// <summary>
7+ /// Validating the Rust SBOM detector against the Rust crate detector.
8+ /// </summary>
9+ public class RustSbomVsCrateExperiment : IExperimentConfiguration
10+ {
11+ /// <inheritdoc />
12+ public string Name => "RustSbomVsCrateExperiment" ;
13+
14+ /// <inheritdoc/>
15+ public bool IsInControlGroup ( IComponentDetector componentDetector ) => componentDetector is RustCrateDetector ;
16+
17+ /// <inheritdoc/>
18+ public bool IsInExperimentGroup ( IComponentDetector componentDetector ) => componentDetector is RustSbomDetector ;
19+
20+ /// <inheritdoc />
21+ public bool ShouldRecord ( IComponentDetector componentDetector , int numComponents ) => true ;
22+ }
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ public static IServiceCollection AddComponentDetection(this IServiceCollection s
6565 services . AddSingleton < IExperimentService , ExperimentService > ( ) ;
6666 services . AddSingleton < IExperimentProcessor , DefaultExperimentProcessor > ( ) ;
6767 services . AddSingleton < IExperimentConfiguration , SimplePipExperiment > ( ) ;
68+ services . AddSingleton < IExperimentConfiguration , RustSbomVsCliExperiment > ( ) ;
69+ services . AddSingleton < IExperimentConfiguration , RustSbomVsCrateExperiment > ( ) ;
6870 services . AddSingleton < IExperimentConfiguration , UvLockDetectorExperiment > ( ) ;
6971
7072 // Detectors
You can’t perform that action at this time.
0 commit comments