From bb677259e10f50ba5f477820df3f2419e76296b9 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 2 Jun 2013 20:22:47 -0700 Subject: [PATCH] added missing file --- .../ReflectionStrategyFixture/Benchmarks.cs | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 NzbDrone.Core.Test/Datastore/ReflectionStrategyFixture/Benchmarks.cs diff --git a/NzbDrone.Core.Test/Datastore/ReflectionStrategyFixture/Benchmarks.cs b/NzbDrone.Core.Test/Datastore/ReflectionStrategyFixture/Benchmarks.cs new file mode 100644 index 000000000..94569ce04 --- /dev/null +++ b/NzbDrone.Core.Test/Datastore/ReflectionStrategyFixture/Benchmarks.cs @@ -0,0 +1,43 @@ +using Marr.Data.Reflection; +using NUnit.Framework; +using NzbDrone.Core.Datastore; +using NzbDrone.Core.Tv; + +namespace NzbDrone.Core.Test.Datastore.ReflectionStrategyFixture +{ + [TestFixture] + public class Benchmarks + { + private const int iterations = 5000000; + private object _target; + private IReflectionStrategy _simpleReflectionStrategy; + + [SetUp] + public void Setup() + { + // _simpleReflectionStrategy = new DelegateReflectionStrategy(); + } + + [Test] + public void clr_reflection_test() + { + _target = new Series(); + + var del = _simpleReflectionStrategy.BuildSetter(typeof(Series), "Title"); + + for (int i = 0; i < iterations; i++) + { + del(_target, "TestTile"); + //_simpleReflectionStrategy.SetFieldValue(_target, "Title", "TestTile"); + } + } + + + private void SetField() + { + + + } + + } +} \ No newline at end of file