/* * called by controlPanel when import dialog is OKed. */ public void importSingle(string[] filenames) { List <BenchRound> brs = new List <BenchRound>(); foreach (string fpath in filenames) { XmlDocument doc = new XmlDocument(); XmlNode fakeSeries = doc.CreateNode(XmlNodeType.Element, "test_nice", doc.NamespaceURI); doc.AppendChild(fakeSeries); ParamSet ps = new ParamSet(); XmlDocument tempdoc = new XmlDocument(); tempdoc.Load(fpath); XmlNode fakeRound = doc.CreateNode(XmlNodeType.Element, "test_round", doc.NamespaceURI); XmlAttribute iter = doc.CreateAttribute("iter"); iter.Value = ("1").ToString(); fakeRound.Attributes.Append(iter); fakeRound.AppendChild(doc.ImportNode( XmlParse.selNode(tempdoc, "pmbenchmark"), true)); fakeSeries.AppendChild(fakeRound); ps.setParamsFromNode(getParamsNodeFromSeriesNode(fakeSeries)); ps.operatingSystem = XmlParse.selNode(tempdoc, "pmbenchmark/report/signature/pmbench_info/version_options").InnerText; BenchSiblings bench = new BenchSiblings(fakeSeries, doc, ps); string fname = Path.GetFileNameWithoutExtension(fpath); bench.averageRound.customName = registerXmlDocName(fname, doc); //XXX fix this! moved from addSeriesAverageToManual() if (harness.baseParams == null) { harness.baseParams = bench.benchParams; } brs.Add(bench.averageRound); } harness.addNewBenchrounds(brs); }