コード例 #1
0
ファイル: BenchMark.cs プロジェクト: karino2/wikipediaconv
        public void DoBenchmark()
        {
            var solutionDir = @"../../../";
            var benchDir = solutionDir + "bench/";
            var outputDir = new DirectoryInfo(solutionDir + "test_tmp_result");
            CleanUp(outputDir);
            var bzipPath = benchDir + JA_HEAD_NAME;
            PerfCounter counter = new PerfCounter();
            counter.Start("AllBench");

            var outputDirDIC = DirectoryInfoCache.CreateRoot(outputDir);
            outputDirDIC.InterestedFilePattern = "*.wiki";
            outputDirDIC.SyncAllToFileSystem();

            var dumper = Dumper.CreateRawDumper(bzipPath, true, outputDirDIC, counter);
            // simulate split folder for large data
            SetupParameterForBenchMark(dumper);
            dumper._bzipReader.DecodeAsync();

            bzipPath = benchDir + "jatail.xml.bz2";
            dumper = Dumper.CreateRawDumper(bzipPath, true, outputDirDIC, counter);
            SetupParameterForBenchMark(dumper);
            dumper._bzipReader.DecodeAsync();

            counter.Stop("AllBench");
            if(EnableReport)
                Report(benchDir, counter);

            Console.WriteLine(counter.ToString());
        }
コード例 #2
0
 private void UpdateTextBox()
 {
     textBox1.Text = _counter.ToString();
 }
コード例 #3
0
 private void profileButton_Click(object sender, EventArgs e)
 {
     textBox.AppendText(_counter.ToString());
 }