protected override void OnCreate (Bundle savedInstanceState)
{
string architecture = Android.OS.Build.CpuAbi;
base.OnCreate (savedInstanceState);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
FindViewById<Button> (Resource.Id.myButton).Click += delegate {
string benchmarkName = FindViewById<TextView> (Resource.Id.benchmark).Text;
string githubAPIKey = FindViewById<TextView> (Resource.Id.githubAPIKey).Text;
string httpAPITokens = FindViewById<TextView> (Resource.Id.httpAPITokens).Text;
string machineName = FindViewById<TextView> (Resource.Id.machineName).Text;
long runSetId = Int64.Parse (FindViewById<TextView> (Resource.Id.runSetId).Text);
string configName = FindViewById<TextView> (Resource.Id.configName).Text;
InitCommons (githubAPIKey, httpAPITokens);
SetStartButtonText ("running");
RunBenchmark (runSetId, benchmarkName, machineName, architecture, configName);
};
string v = ".NET version:\n" + System.Environment.Version.ToString ();
v += "\n\nMonoVersion:\n" + GetMonoVersion ();
v += "\nArchitecture: " + architecture;
FindViewById<TextView> (Resource.Id.versionText).Text = v;
Logging.GetLogging ().Info (v);
#if false
if (AndroidCPUManagment.IsRooted ()) {
Logging.GetLogging ().Info ("Ohai: On a rooted device!");
CpuManager = new AndroidCPUManagment ();
CpuManager.ConfigurePerformanceMode ();
} else {
Logging.GetLogging ().Warn ("device not rooted, thus can't set CPU frequency: expect flaky results");
}
#endif
Logging.GetLogging ().Info ("OnCreate finished");
}
}