Add some new benchmarks. They will be added to the makefile after the freeze
[mono.git] / mono / benchmark / lock.cs
diff --git a/mono/benchmark/lock.cs b/mono/benchmark/lock.cs
new file mode 100644 (file)
index 0000000..28e9bf1
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+class T {
+       static void Main () {
+               int i = Environment.TickCount;
+               new T ().X ();
+               Console.WriteLine (Environment.TickCount - i);
+       }
+       
+       void X () {
+               for (int i = 0; i < 10000000; i ++)
+                       lock (this) {}
+       }
+}
\ No newline at end of file