diff options
author | Alan McGovern <alan@xamarin.com> | 2018-05-25 19:53:07 +0300 |
---|---|---|
committer | Alan McGovern <alan@xamarin.com> | 2018-05-25 19:53:07 +0300 |
commit | 019e09575abd7d3f1befc33eab2c655eb65aa8f0 (patch) | |
tree | d9f4caa68d9ce4838281db19dd35ec9ff262bc86 | |
parent | d449ff82255a079b050af001a12e1756c4cf1a18 (diff) |
wipperf-test
-rw-r--r-- | Xamarin.PropertyEditing.Mac.Standalone/AppDelegate.cs | 15 | ||||
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs | 10 |
2 files changed, 24 insertions, 1 deletions
diff --git a/Xamarin.PropertyEditing.Mac.Standalone/AppDelegate.cs b/Xamarin.PropertyEditing.Mac.Standalone/AppDelegate.cs index 9043c44..987ee09 100644 --- a/Xamarin.PropertyEditing.Mac.Standalone/AppDelegate.cs +++ b/Xamarin.PropertyEditing.Mac.Standalone/AppDelegate.cs @@ -12,9 +12,24 @@ namespace Xamarin.PropertyEditing.Mac.Standalone public override void DidFinishLaunching (NSNotification notification) { + BeginLooping(); // Insert code here to initialize your application } + async void BeginLooping () + { + while (true) { + + var start = System.DateTime.Now; + for (int i = 0; i < 500; i ++) + (BooleanCreateor.Create () as System.IDisposable)?.Dispose (); + + var total = (System.DateTime.Now - start).TotalMilliseconds; + System.Console.WriteLine ($"{total}ms total. {total/500} per control"); + await System.Threading.Tasks.Task.Delay (500); + } + } + public override void WillTerminate (NSNotification notification) { // Insert code here to tear down your application diff --git a/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs index 5e5b192..e37a992 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/BooleanEditorControl.cs @@ -5,7 +5,15 @@ using Xamarin.PropertyEditing.Mac.Resources; using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac -{ +{
+ public class BooleanCreateor
+
+ {
+ public static object Create ()
+ {
+ return new BooleanEditorControl ();
+ }
+ } internal class BooleanEditorControl : PropertyEditorControl<PropertyViewModel<bool?>> { const string setBezelColorSelector = "setBezelColor:"; |