static void Main(string[] args) { var pathToFolderWithMetrics = args[0]; var pathToTestedRepository = args[1]; var volumeMetricsProvider = new VolumeMetricsProvider(pathToFolderWithMetrics); var allFilesData = volumeMetricsProvider.ProvideVolumeMetrics(); var gitConnector = new GitProvider(pathToTestedRepository); var volumeMetricsWithCommits = gitConnector.AddCommitsMetrics(allFilesData); var basicMetricsProvider = new BasicMetricsProvider(pathToFolderWithMetrics); var basicMetrics = basicMetricsProvider.ProvideBasicMetrics(); var metricsAggregator = new MetricsAggregator(); var aggregatedMetrics = metricsAggregator.AggregateMetrics(basicMetrics, volumeMetricsWithCommits); var additionalInformationCreator = new AdditionalInformationCreator(); additionalInformationCreator.SaveToFileLimitValues(aggregatedMetrics); additionalInformationCreator.SaveToFileAsJson(aggregatedMetrics); var treeStructureConverter = new TreeStructureConverter(); var treeStructureMetrics = treeStructureConverter.GenerateTreeStructureFromPaths(aggregatedMetrics); var jsonTreeStructureMetrics = JsonConvert.SerializeObject(treeStructureMetrics); File.WriteAllText(Directory.GetCurrentDirectory() + "\\OutputsFiles\\FinalStatisticsOutput.json", jsonTreeStructureMetrics); }
public MetricCollectionServiceShould() { this.fakeMonitoringResource = A.Fake <IMonitoringApiClient>(); this.fakeMetricsAggregator = A.Fake <MetricsAggregator>(); this._fakeMetricsRequest = BuildMetricRequest(); this.sut = new MetricCollectionService(this.fakeMonitoringResource, this.fakeMetricsAggregator); }
public ISession CreateSession(Action <ISession> initializationAction) { var agenda = CreateAgenda(); var workingMemory = new WorkingMemory(); var eventAggregator = new EventAggregator(_eventAggregator); var metricsAggregator = new MetricsAggregator(); var actionExecutor = new ActionExecutor(); var idGenerator = new IdGenerator(); var session = new Session(_network, agenda, workingMemory, eventAggregator, metricsAggregator, actionExecutor, idGenerator, DependencyResolver, ActionInterceptor); initializationAction?.Invoke(session); session.Activate(); return(session); }