Recreate benchmark project and update deps Fix #3561

This commit is contained in:
James Jackson-South
2018-11-08 15:33:14 +00:00
committed by Sebastiaan Janssen
parent f13cc6a210
commit 0803e0fa7f
8 changed files with 52 additions and 406 deletions

View File

@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Engines;
using Umbraco.Core;
namespace Umbraco.Tests.Benchmarks
@@ -12,9 +14,9 @@ namespace Umbraco.Tests.Benchmarks
private static readonly string Date = "Saturday 10, November 2012";
[Benchmark(Description = "List<string> to IEnumerable<string>")]
public IEnumerable<string> TryConvertToEnumerable()
public IList<string> TryConvertToEnumerable()
{
return List.TryConvertTo<IEnumerable<string>>().Result;
return List.TryConvertTo<IEnumerable<string>>().Result.ToList();
}
[Benchmark(Description = "Int to Double")]
@@ -41,4 +43,4 @@ namespace Umbraco.Tests.Benchmarks
return Date.TryConvertTo<DateTime>().Result;
}
}
}
}