Skip to content

Commit

Permalink
Add new VCPKG experiment (#1042)
Browse files Browse the repository at this point in the history
* Add new VCPKG experiment
  • Loading branch information
grvillic committed Mar 21, 2024
1 parent c549433 commit c06abda
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace Microsoft.ComponentDetection.Orchestrator.Experiments.Configs;

using Microsoft.ComponentDetection.Contracts;
using Microsoft.ComponentDetection.Detectors.Vcpkg;

/// <summary>
/// Validating the <see cref="VcpkgComponentDetector"/>.
/// </summary>
public class VcpkgExperiment : IExperimentConfiguration
{
public string Name => "VcpkgDetector";

public bool IsInControlGroup(IComponentDetector componentDetector) => false; // There is no baseline, completely new detector

public bool IsInExperimentGroup(IComponentDetector componentDetector) => componentDetector is VcpkgComponentDetector;

public bool ShouldRecord(IComponentDetector componentDetector, int numComponents) => true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public static IServiceCollection AddComponentDetection(this IServiceCollection s
services.AddSingleton<IExperimentProcessor, DefaultExperimentProcessor>();
services.AddSingleton<IExperimentConfiguration, SimplePipExperiment>();
services.AddSingleton<IExperimentConfiguration, RustCliDetectorExperiment>();
services.AddSingleton<IExperimentConfiguration, VcpkgExperiment>();

// Detectors
// CocoaPods
Expand Down

0 comments on commit c06abda

Please sign in to comment.