Example #1
0
        void btnLoadResults_Click(object sender, EventArgs e)
        {
            var form = new OpenFileDialog
            {
                DefaultExt       = ".json",
                Filter           = ".json (Benchmark batch results)|*.json",
                InitialDirectory = lastUsedBatchFolder ?? springPaths.WritableDirectory,
                Title            = "Load results of benchmark run"
            };

            if (form.ShowDialog() == DialogResult.OK)
            {
                batchResult = BatchRunResult.Load(form.FileName);
                if (batchResult != null)
                {
                    btnGraphs.Enabled    = true;
                    btnDataSheet.Enabled = true;

                    tbResults.Clear();
                    foreach (var run in batchResult.RunEntries)
                    {
                        tbResults.AppendText(string.Format("== RUN {0} {1} ==\n", run.TestCase, run.Benchmark));
                        tbResults.AppendText(run.RawLog);
                    }
                }
            }
        }