File tree Expand file tree Collapse file tree 5 files changed +24
-28
lines changed
tests/ImageProcessorCore.Benchmarks Expand file tree Collapse file tree 5 files changed +24
-28
lines changed Original file line number Diff line number Diff line change 1- <?xml version =" 1.0" encoding =" utf-8" ?>
1+ <?xml version =" 1.0" encoding =" utf-8" ?>
22<configuration >
33 <packageSources >
44 <add key =" nuget.org" value =" https://api.nuget.org/v3/index.json" />
5+ <add key =" benchmarkDotNetDevelop" value =" https://ci.appveyor.com/nuget/benchmarkdotnet" />
56 </packageSources >
67</configuration >
Original file line number Diff line number Diff line change 1+ using BenchmarkDotNet . Configs ;
2+
3+ namespace ImageProcessorCore . Benchmarks
4+ {
5+ public class Config : ManualConfig
6+ {
7+ public Config ( )
8+ {
9+ // uncomment if you want to use any of the diagnoser
10+ //Add(new BenchmarkDotNet.Diagnostics.MemoryDiagnoser());
11+ //Add(new BenchmarkDotNet.Diagnostics.InliningDiagnoser());
12+ }
13+ }
14+ }
Original file line number Diff line number Diff line change 11namespace ImageProcessorCore . Benchmarks
22{
3- using System ;
4- using System . Collections . Generic ;
5- using System . Linq ;
6- using System . Reflection ;
7-
8- using BenchmarkDotNet . Attributes ;
93 using BenchmarkDotNet . Running ;
104
115 public class Program
@@ -18,20 +12,7 @@ public class Program
1812 /// </param>
1913 public static void Main ( string [ ] args )
2014 {
21- // Use reflection for a more maintainable way of creating the benchmark switcher,
22- Type [ ] benchmarks = typeof ( Program ) . Assembly . GetTypes ( )
23- . Where ( t => t . GetMethods ( BindingFlags . Instance | BindingFlags . Public )
24- . Any ( m => m . GetCustomAttributes ( typeof ( BenchmarkAttribute ) , false ) . Any ( ) ) )
25- . OrderBy ( t => t . Namespace )
26- . ThenBy ( t => t . Name )
27- . ToArray ( ) ;
28-
29- // TODO: This throws an exception.
30- // List<string> x = new List<string>(args) { "diagnosers=MemoryDiagnoser,InliningDiagnoser" };
31- BenchmarkSwitcher benchmarkSwitcher = new BenchmarkSwitcher ( benchmarks ) ;
32-
33- // benchmarkSwitcher.Run(x.ToArray());
34- benchmarkSwitcher . Run ( args ) ;
15+ new BenchmarkSwitcher ( typeof ( Program ) . Assembly ) . Run ( args ) ;
3516 }
3617 }
3718}
Original file line number Diff line number Diff line change 11using System . Reflection ;
22using System . Runtime . CompilerServices ;
33using System . Runtime . InteropServices ;
4+ using BenchmarkDotNet . Attributes ;
5+ using ImageProcessorCore . Benchmarks ;
46
57// General Information about an assembly is controlled through the following
68// set of attributes. Change these attribute values to modify the information
2123
2224// The following GUID is for the ID of the typelib if this project is exposed to COM
2325[ assembly: Guid ( "299d8e18-102c-42de-adbf-79098ee706a8" ) ]
26+
27+ [ assembly: Config ( typeof ( Config ) ) ]
Original file line number Diff line number Diff line change 1313 "emitEntryPoint" : true
1414 },
1515 "dependencies" : {
16- "BenchmarkDotNet" : " 0.9.7 " ,
17- "BenchmarkDotNet.Diagnostics.Windows" : " 0.9.7 " ,
16+ "BenchmarkDotNet" : " 0.9.8-develop " ,
17+ "BenchmarkDotNet.Diagnostics.Windows" : " 0.9.8-develop " ,
1818 "ImageProcessorCore" : " 1.0.0-*"
1919 },
2020 "commands" : {
2424 "net451" : {
2525 "dependencies" : {
2626 },
27- "imports" : [
28- " dnx451"
29- ],
3027 "frameworkAssemblies" : {
31- "System.Drawing" : " " ,
32- "System.Runtime" : " "
28+ "System.Drawing" : " "
3329 }
3430 }
3531 }
You can’t perform that action at this time.
0 commit comments