public static GLCubeResultViewController FromRemoteResults() { GLCubeResultViewController ret = new GLCubeResultViewController (); ret._isRemote = true; PerformanceTestingDataService service = new PerformanceTestingDataService (); service.BeginGetPerformanceCubeResults ((result) => { PerformanceCubeResult [] results = service.EndGetPerformanceCubeResults (result); lock (ret._glResultsLock) { foreach (PerformanceCubeResult res in results) { ret._glResults.Add (new GLCubeResult (res.NumberOfTriangles,res.FramesPerSecond)); } } ret.InvokeOnMainThread (()=> { ret.TableView.ReloadData (); }); }, null); return ret; }
void postResults(GLCubeResult cubeResult) { PerformanceTestingDataService service = new PerformanceTestingDataService (); PerformanceCubeResult result = new PerformanceCubeResult () { DeviceDatabaseId = DeviceInfo.CurrentDevice.DatabaseId, DeviceDatabaseIdSpecified = true, NumberOfTriangles = cubeResult.NumberOfTriangles, NumberOfTrianglesSpecified = true, FramesPerSecond = cubeResult.FramesPerSecond, FramesPerSecondSpecified = true, IsMonoTouch = true, IsMonoTouchSpecified = true }; service.AddPerformanceCubeResultAsync (result); }
void postResults() { PerformanceTestingDataService service = new PerformanceTestingDataService (); service.AddPerformanceMatrixTestResultAsync (new MatrixTestResult () { DeviceDatabaseId = DeviceInfo.CurrentDevice.DatabaseId, DeviceDatabaseIdSpecified = true, IsMonoTouch = true, IsMonoTouchSpecified = true, CSTestResult = _currentTests[0].MFlopsPerSecond, CSTestResultSpecified = true, CTestResult = _currentTests[1].MFlopsPerSecond, CTestResultSpecified = true, BLASTestResult = _currentTests[2].MFlopsPerSecond, BLASTestResultSpecified = true }); }
private void fetchInfoFromServer() { PerformanceTestingDataService service = new PerformanceTestingDataService (); FullDeviceInfo di = null; try { di = service.FindFullDeviceInfo (this.UniqueId); } catch { // I have an iPad that fails here. } if (di == null) { this.RegisterWithServer (); } else { this.DatabaseId = di.DatabaseId; this.OwnerName = di.OwnerName; } }
public void RegisterWithServer() { FullDeviceInfo deviceInfo = new FullDeviceInfo (); deviceInfo.ModelName = this.ModelName; deviceInfo.UIIdion = this.UIIdion; deviceInfo.SpecificHWVersion = this.SpecificHWVersion; deviceInfo.OSName = this.OSName; deviceInfo.OSVersion = this.OSVersion; deviceInfo.UniqueId = this.UniqueId; deviceInfo.SystemName = this.DeviceName; deviceInfo.OwnerName = this.OwnerName; PerformanceTestingDataService service = new PerformanceTestingDataService (); service.BeginAddDevice (deviceInfo, (result) => { Console.WriteLine ("Done"); this.DatabaseId = service.EndAddDevice (result); } , null); }
void postButtonClicked(object sender, EventArgs e) { List<PerformanceCubeResult> results = new List<PerformanceCubeResult>(_glResults.Count); PerformanceTestingDataService service = new PerformanceTestingDataService (); for (int i=0; i<_glResults.Count; i++) { PerformanceCubeResult result = new PerformanceCubeResult (); result.DeviceDatabaseId = DeviceInfo.CurrentDevice.DatabaseId; result.DeviceDatabaseIdSpecified = true; result.NumberOfTriangles = _glResults[i].NumberOfTriangles; result.NumberOfTrianglesSpecified = true; result.FramesPerSecond = _glResults[i].FramesPerSecond; result.FramesPerSecondSpecified = true; result.IsMonoTouch = result.IsMonoTouchSpecified = true; results.Add (result); } service.BeginAddPerformanceCubeResults ( results.ToArray (), (addResult) => { Console.WriteLine ("Done"); }, null); }