Пример #1
0
 public void SelectAllBenchmarks()
 {
     SuiteManager.SelectAllBenchmarks();
 }
Пример #2
0
 public void RemoveSuite(BenchmarkSuiteInstance suite)
 {
     SuiteManager.RemoveSuite(suite);
 }
Пример #3
0
 public void RemoveAllSuites()
 {
     SuiteManager.RemoveAllSuites();
 }
Пример #4
0
 public void LoadSuitesFromAssembly(string assemblyName)
 {
     SuiteManager.LoadSuitesFromAssembly(assemblyName);
 }
Пример #5
0
 public void RemoveSuite(string suiteName)
 {
     SuiteManager.RemoveSuite(suiteName);
 }
Пример #6
0
 public void AddSuite(BenchmarkSuiteInstance suite)
 {
     SuiteManager.AddSuite(suite);
 }
Пример #7
0
 public void AddSuiteFromClass(string suiteClassName)
 {
     SuiteManager.AddSuiteFromClass(suiteClassName);
 }
Пример #8
0
 public void SelectBenchmarks(params Benchmark[] benchmarks)
 {
     SuiteManager.SelectBenchmarks(benchmarks);
 }
Пример #9
0
 public void SelectBenchmarks(params string[] benchmarkNames)
 {
     SuiteManager.SelectBenchmarks(benchmarkNames);
 }
Пример #10
0
        //fetch the server side baselines by providing the suites, pltform and API, later will have to change this to allow more strict baseline matching <TODO
        public static IEnumerator FetchBaselines(Suite[] suites, string platform, string api, Action <ResultsIOData[]> outdata)
        {
            List <ResultsIOData> data   = new List <ResultsIOData> ();        //ResultsIOData to send back to resultsIO for local processing
            List <string>        tables = new List <string>();

            //Get the table names to pull baselines from
            foreach (Suite suite in suites)
            {
                string[]    tbls = null;
                IEnumerator i    = FetchBaseLineTables(suite.suiteName, (value => { tbls = value; }));
                while (i.MoveNext())
                {
                    yield return(null);
                }
                tables.AddRange(tbls);
            }
            int n = 0;

            foreach (string table in tables)
            {
                string suite    = table.Substring(0, table.IndexOf("_"));                                               //grab the suite from the table name
                string testType = table.Substring(table.IndexOf("_") + 1, table.LastIndexOf("_") - (suite.Length + 1)); //grab the test type from the table name
                data.Add(new ResultsIOData());
                data [n].suite    = suite;
                data [n].testType = testType;
                foreach (Group grp in SuiteManager.GetSuiteByName(suite).groups)
                {
                    ProgressScreen.Instance.SetState(true, ProgressType.CloudLoad, "Fetching Baselines\n" + data[n].suite + " | " + grp.groupName);
                    //This line controls how baselines are selected, right now only Platform and API are unique
                    string  query    = String.Format("SELECT * FROM {0} WHERE platform='{1}' AND api='{2}' AND groupname='{3}'", table, platform, api, grp.groupName);
                    RawData _rawData = new RawData();

                    IEnumerator i = SQLRequest(query, (value => { _rawData = value; }));
                    while (i.MoveNext())
                    {
                        yield return(null);
                    }

                    if (_rawData.fields.Count == 0 || _rawData.fields[0] == "Null")
                    {
                        continue;
                    }
                    else if (data[n].fieldNames.Count == 0)
                    {
                        data[n].fieldNames.AddRange(_rawData.fields);//Grab the fields from the RawData
                    }
                    for (int x = 0; x < _rawData.data.Count; x++)
                    {
                        ResultsIORow row = new ResultsIORow();        //create a new row
                        row.resultsColumn.AddRange(_rawData.data[x]); //store the current row of values
                        data[n].resultsRow.Add(row);                  //add it to the data to send back to resultsIO
                    }
                    if (data[n].fieldNames.Count == 0)
                    {
                        data.RemoveAt(n);
                    }
                }
                n++;
            }
            outdata(data.ToArray());
        }