public SimilarityController(SimilarityService similarityService, DumpRepository dumpRepository, BundleRepository bundleRepository, ILoggerFactory loggerFactory) { this.similarityService = similarityService; this.dumpRepository = dumpRepository; this.bundleRepository = bundleRepository; logger = loggerFactory.CreateLogger <SimilarityController>(); }
public HomeController( SuperDumpRepository superDumpRepo, BundleRepository bundleRepo, DumpRepository dumpRepo, IDumpStorage dumpStorage, IOptions <SuperDumpSettings> settings, PathHelper pathHelper, RelationshipRepository relationshipRepo, SimilarityService similarityService, ElasticSearchService elasticService, ILoggerFactory loggerFactory, IAuthorizationHelper authorizationHelper, JiraIssueRepository jiraIssueRepository, SearchService searchService, DownloadService downloadService) { this.superDumpRepo = superDumpRepo; this.bundleRepo = bundleRepo; this.dumpRepo = dumpRepo; this.dumpStorage = dumpStorage; this.settings = settings.Value; this.pathHelper = pathHelper; this.relationshipRepo = relationshipRepo; this.similarityService = similarityService; logger = loggerFactory.CreateLogger <HomeController>(); this.authorizationHelper = authorizationHelper; this.jiraIssueRepository = jiraIssueRepository; this.searchService = searchService; this.downloadService = downloadService; }
public AnalyzerPipeline( DumpRepository dumpRepo, BundleRepository bundleRepo, PathHelper pathHelper, IOptions <SuperDumpSettings> settings, ElasticSearchService elasticSearch, SimilarityService similarityService, FaultReportingService faultReportingService, IOneAgentSdk dynatraceSdk) { var analyzers = new List <AnalyzerJob>(); analyzers.Add(new DumpAnalyzerJob(dumpRepo, settings, pathHelper, dynatraceSdk)); analyzers.Add(new EmptyAnalyzerJob(dumpRepo)); var postAnalyzers = new List <PostAnalysisJob>(); postAnalyzers.Add(new ElasticSearchJob(bundleRepo, dumpRepo, elasticSearch)); postAnalyzers.Add(new SimilarityAnalyzerJob(similarityService, settings)); postAnalyzers.Add(new FaultReportJob(faultReportingService, settings)); Analyzers = analyzers; InitialAnalyzers = analyzers.Where(analyzerJob => analyzerJob is InitalAnalyzerJob).Cast <InitalAnalyzerJob>(); PostAnalysisJobs = postAnalyzers; }
public void PelletSimilarity2() { PelletServer server = new PelletServer(PelletTestServer); Type svcType = typeof(SimilarityService); foreach (KnowledgeBase kb in server.KnowledgeBases) { if (kb.SupportsService(svcType)) { Console.WriteLine(kb.Name + " supports Similarity"); SimilarityService svc = (SimilarityService)kb.GetService(svcType); List <KeyValuePair <INode, double> > results = svc.Similarity(5, "wine:Red"); foreach (KeyValuePair <INode, double> kvp in results) { Console.WriteLine(kvp.Key.ToString() + " (Similarity = " + kvp.Value + ")"); } } else { Console.WriteLine(kb.Name + " does not support the Similarity Service"); } Console.WriteLine(); } }
public HomeController(IHostingEnvironment environment, SuperDumpRepository superDumpRepo, BundleRepository bundleRepo, DumpRepository dumpRepo, DumpStorageFilebased dumpStorage, IOptions <SuperDumpSettings> settings, PathHelper pathHelper, RelationshipRepository relationshipRepo, SimilarityService similarityService) { this.environment = environment; this.superDumpRepo = superDumpRepo; this.bundleRepo = bundleRepo; this.dumpRepo = dumpRepo; this.dumpStorage = dumpStorage; this.settings = settings.Value; this.pathHelper = pathHelper; this.relationshipRepo = relationshipRepo; this.similarityService = similarityService; }
public HomeController(IHostingEnvironment environment, SuperDumpRepository superDumpRepo, BundleRepository bundleRepo, DumpRepository dumpRepo, DumpStorageFilebased dumpStorage, IOptions <SuperDumpSettings> settings, PathHelper pathHelper, RelationshipRepository relationshipRepo, SimilarityService similarityService, ILoggerFactory loggerFactory, IAuthorizationHelper authorizationHelper) { this.environment = environment; this.superDumpRepo = superDumpRepo; this.bundleRepo = bundleRepo; this.dumpRepo = dumpRepo; this.dumpStorage = dumpStorage; this.settings = settings.Value; this.pathHelper = pathHelper; this.relationshipRepo = relationshipRepo; this.similarityService = similarityService; logger = loggerFactory.CreateLogger <HomeController>(); this.authorizationHelper = authorizationHelper; }
public AdminController(SimilarityService similarityService, DumpRepository dumpRepository, BundleRepository bundleRepository, ILoggerFactory loggerFactory, IdenticalDumpRepository identicalDumpRepository, JiraIssueRepository jiraIssueRepository, IOptions <SuperDumpSettings> settings, ElasticSearchService elasticService) { this.similarityService = similarityService; this.bundleRepository = bundleRepository; this.identicalDumpRepository = identicalDumpRepository; this.jiraIssueRepository = jiraIssueRepository; this.elasticService = elasticService; logger = loggerFactory.CreateLogger <AdminController>(); this.settings = settings.Value; }
public SimilarityServiceBenchmarks() { /// fake a repository of N very similar dumps. Then let similarity calculation run /// simulate filesystem access with Thread.Sleep in FakeDumpStorage N = 1000; var settings = Options.Create(new SuperDumpSettings { SimilarityDetectionEnabled = true, SimilarityDetectionMaxDays = 30 }); this.pathHelper = new PathHelper("", "", ""); this.dumpStorage = new FakeDumpStorage(CreateFakeDumps(N)); this.dumpRepo = new DumpRepository(dumpStorage, pathHelper, settings); this.relationshipStorage = new FakeRelationshipStorage(); this.relationshipRepo = new RelationshipRepository(relationshipStorage, dumpRepo, settings); this.similarityService = new SimilarityService(dumpRepo, relationshipRepo, settings, Dynatrace.OneAgent.Sdk.Api.OneAgentSdkFactory.CreateInstance()); }
public void PelletSimilarity() { PelletServer server = new PelletServer(PelletTestServer); Type svcType = typeof(SimilarityService); foreach (KnowledgeBase kb in server.KnowledgeBases) { if (kb.SupportsService(svcType)) { Console.WriteLine(kb.Name + " supports Similarity"); SimilarityService svc = (SimilarityService)kb.GetService(svcType); IGraph g = svc.SimilarityRaw(5, "wine:Red"); TestTools.ShowGraph(g); } else { Console.WriteLine(kb.Name + " does not support the Similarity Service"); } Console.WriteLine(); } }
public SimilarityAnalyzerJob(SimilarityService similarityService, IOptions <SuperDumpSettings> settings) { this.similarityService = similarityService; this.settings = settings; }
public SimilarityController(SimilarityService similarityService, DumpRepository dumpRepository) { this.similarityService = similarityService; this.dumpRepository = dumpRepository; }