mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
40 lines
No EOL
910 B
C#
40 lines
No EOL
910 B
C#
using NUnit.Framework;
|
|
|
|
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()
|
|
{
|
|
|
|
|
|
}*/
|
|
|
|
}
|
|
} |