Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (sm.IsInAsyncPostBack)
                return;

            #if UseServiceReference
            PerformanceTestingDataServiceClient svc = new PerformanceTestingDataServiceClient();
            #else
            PerformanceTestingDataService svc = new PerformanceTestingDataService();
            #endif
            List<DeviceInfo> deviceList = svc.GetDeviceList();
            List<PerformanceCubeResult> glResultsArray = svc.GetPerformanceCubeResults();
            List<MatrixTestResult> flopResultsArray = svc.GetPerformanceMatrixResults ();

            if (glResultsArray.Count != 0) {
                DeviceTable deviceTable = new DeviceTable (glResultsArray, deviceList);
                PopulateTable (deviceTable, GLDeviceList, false);
            }

            if (flopResultsArray.Count != 0) {
                DeviceTable deviceTable = new DeviceTable (flopResultsArray, deviceList);
                PopulateTable (deviceTable, FLOPDeviceList, true);
            }

            drawAllCharts ();
        }
Пример #2
0
        private string GetFLOPDrawScriptString()
        {
            #if UseServiceReference
            PerformanceTestingDataServiceClient svc = new PerformanceTestingDataServiceClient();
            #else
            PerformanceTestingDataService svc = new PerformanceTestingDataService();
            #endif

            List<MatrixTestResult> flopResultsArray = svc.GetPerformanceMatrixResults ();
            DeviceTable deviceTable = new DeviceTable (flopResultsArray,
                                                       svc.GetDeviceList ());

            SyncDeviceTableCheckState(deviceTable, FLOPDeviceList);

            if (flopResultsArray.Count == 0)
            {
                return string.Empty;
            }

            DeviceTable trimmedDeviceTable = deviceTable.CreateCheckedList();
            FLOPResultsTable resultTable = new FLOPResultsTable(flopResultsArray, trimmedDeviceTable);

            if (resultTable.IsEmpty)
            {
                return string.Empty;
            }

            StringBuilder bob = new StringBuilder();
            resultTable.WriteData(bob, BLASCheckbox.Checked);

            StringBuilder sb = new StringBuilder();
            sb.Append("drawFLOPChartWithData(");
            sb.Append(bob.ToString());
            sb.AppendFormat(", '{0}');", _flopChartName);

            return sb.ToString ();
        }
Пример #3
0
        private string GetGLDrawScriptString()
        {
            #if UseServiceReference
            PerformanceTestingDataServiceClient svc = new PerformanceTestingDataServiceClient();
            #else
            PerformanceTestingDataService svc = new PerformanceTestingDataService();
            #endif

            List<PerformanceCubeResult> resultsArray = svc.GetPerformanceCubeResults();
            DeviceTable deviceTable = new DeviceTable (resultsArray,
                                                       svc.GetDeviceList ());

            SyncDeviceTableCheckState(deviceTable, GLDeviceList);

            if (resultsArray.Count == 0)
            {
                return string.Empty;
            }

            DeviceTable trimmedDeviceTable = deviceTable.CreateCheckedList();
            GLResultsTable resultTable = new GLResultsTable(resultsArray, trimmedDeviceTable);

            if (resultTable.IsEmpty)
            {
                return string.Empty;
            }

            StringBuilder bob = new StringBuilder();
            bob.AppendFormat("[\n['Triangles'");

            for (int i = 0; i < trimmedDeviceTable.NuberOfDevices; i++)
            {
                bob.AppendFormat(", 'Device {0} - {1}'", trimmedDeviceTable[i].DatabaseId, trimmedDeviceTable[i].IsMono ? "With Mono" : "W/O Mono");
            }

            bob.AppendFormat("],\n");

            resultTable.WriteData(bob);
            bob.AppendFormat("]");

            StringBuilder sb = new StringBuilder();
            sb.Append("drawGLWithData(");
            sb.Append(bob.ToString());
            sb.AppendFormat(", '{0}');", _glChartName);

            return sb.ToString ();
        }