Example #1
0
        private void RecalculateData()
        {
            BatchIntervalEngine intervalEngine = new BatchIntervalEngine(DatabaseConnections.SqlConnection, AnalysisConfiguration.ProcessedCaptureFilesPath, "allFiles", 5, AnalysisConfiguration.IntervalSize);
            intervalEngine.RecalculateBatchIntervals();

            ProcessCapturePackets pcp = new ProcessCapturePackets();

            BindingList<CurrentCaptureFile> captureFiles = new BindingList<CurrentCaptureFile>();
            captureFiles = pcp.GetAllCaptureFiles();

            if (captureFiles.Count > 0)
            {
                foreach (CurrentCaptureFile file in captureFiles)
                {
                    AnalysisEngine analysisEngine = new AnalysisEngine(AnalysisConfiguration.TrimSmallPackets, AnalysisConfiguration.HistogramBinSize, AnalysisConfiguration.HypothesisTestType, file);
                    analysisEngine.CalculateSingleBatchStatistics();
                    analysisEngine.CalculateCumulativeBatchStatistics();
                    analysisEngine.CalculateSingleHistogramData();
                    analysisEngine.CalculateCumulativeHistogramData();
                    analysisEngine.CalculateCumulativeProbabilityDistribution(file.CaptureState);
                    analysisEngine.CalculateHypothesisTestResults();
                    analysisEngine = null;
                }
            }
        }