Commit Graph

32 Commits

Author SHA1 Message Date
Nick Craver 1481c4d379 Tooling and project updates (#1333)
This is a branch cleaning up old `#if` clauses, `.csproj` bits, Linux build compatibility, and a few other tid-bits (broken out by commit).

In general: we're on 3.0 tooling and all previous cruft has been removed.
2019-09-26 19:47:55 -04:00
Jesper Meyer 3b0cd9a9a1 Updated Hand Coded benchmarks (#1206)
Hand coded version did not operate under the same circumstances as others.

- Add CommandBehavior.SingleResult and CommandBehavior.SingleRow. All other framworks does this under the hood.
- Run SqlCommand.Prepare() (perhaps it should be benchmarked as "Compiled"?)
- Use GetNullableValue because it's easier to read and slightly faster
- _table.Rows was incrementally added, which made the benchmark run slower the longer it executed. Added _table.Rows.Clear() to prevent the growth.
- Changed select to use * like other benchmarks
2019-09-22 08:40:07 -04:00
Andrés 77cd19d0e9 Fix performance tests (#1331)
Hi!
This PR tries to fix Dapper.Performance.Tests, actually you can't get [MemoryDiagnoser](https://benchmarkdotnet.org/api/BenchmarkDotNet.Diagnosers.MemoryDiagnoser.html)  stats because 
```IDiagnoser.GetColumnProvider()``` method was gone on BenchmarkDotnet 0.11.2. I choose ```DefaultColumnProviders.Metrics``` because of [this](https://github.com/dotnet/BenchmarkDotNet/issues/1184#issuecomment-507377695), i think it's the most simple way to add stats now.

**Before**
![image](https://user-images.githubusercontent.com/34173061/65264060-1a5f7780-db0e-11e9-9c8c-bb4c69a808df.png)

**After**
![image](https://user-images.githubusercontent.com/34173061/65264158-4f6bca00-db0e-11e9-9313-597b09070ae6.png)

On the other hand i choose removing ```[Ordered]``` as temporal solution of https://github.com/dotnet/BenchmarkDotNet/issues/1238, and yeah, the results are still ordered because of https://github.com/StackExchange/Dapper/blob/9282ef2872e1c82c68c86f31e93e8f1ceaacd409/Dapper.Tests.Performance/Config.cs#L42

**Before**
![image](https://user-images.githubusercontent.com/34173061/65264660-6232ce80-db0f-11e9-9046-9c2d8fc5e2d8.png)

**After**
 (No errors)

Thanks for all!!
2019-09-22 08:12:22 -04:00
Damir Ainullin 4dbf74f4d1 Replaced WriteLine with WriteLineColor 2019-09-22 07:55:04 -04:00
Marc Gravell 8152f2c718 WIP: Lib updates and prepare for Microsoft.Data.SqlClient (#1313)
v2 work; primarily prep for split SqlClient
2019-08-28 15:07:32 +01:00
Marc Gravell d19d6012e7 fix #1228 - rev sqlclient to 4.6.0 (#1229)
* fix #1228 - rev sqlclient to 4.6.0
* use transitive deps for SqlClient
2019-04-05 11:39:04 +01:00
Maksim Karpenko 82a0059535 Add the eXpress Persistent Objects (XPO) benchmark (#1131) 2018-11-01 20:58:49 -04:00
Nick Craver c5f884de9b Fix benchmark stability
Lots of runs is good, but changed behavior and greatly affects stability (due to GC).
2018-09-11 21:49:42 -04:00
Nick Craver 0ec089b7d2 Benchmarks: normalize names and give ORMs better names via [Description] 2018-09-11 18:04:35 -04:00
markjerz b262cb33dd Added Dashing Benchmarks (#1126)
Adds Dashing benchmarks to Dapper.Tests.Performance
2018-09-11 17:44:34 -04:00
Nick Craver 5256f2ea0b Benchmarks: Linq2DB tidy 2018-09-11 17:41:58 -04:00
ifle 9313e9f1f8 Added Linq2DB benchmarks (#1125)
Added Linq2DB benchmarks
2018-09-11 17:39:12 -04:00
Nick Craver 0b867bbfa2 Add EF compiled query to benchmarks 2018-09-10 20:37:19 -04:00
Nick Craver 0b168789fd Benchmarks: updating libs and overall runner (#1123)
This is prepping a run we can drop into the README easily. And more info on allocations and such along with it. It's finishing off the benchmark port getting it into a good output state (something we can copy/paste). It removes Simple.Data because the package was debug and causes a lot of issues.

This doesn't output 100% like we want yet (fastest to slowest). BenchmarkDotNet joins summary results after ordering...we need to post-order that. I'm asking the maintainers how to do so.

Also note Belgrade was not parameterizing before, giving it a huge unfair advantage. This has been fixed to be apples:apples.
2018-09-10 20:22:10 -04:00
Nick Craver 522d150e25 Faster builds + use MySqlConnector
MySql.Data is a travesty at this point - moving to something more stable. Really we weren't testing Dapper with previous test failures, we were testing what mood MySql.Data and NuGet extraction are in and which phase of the moon is about.

Also speeds up the builds with 1 restore and 1 build. We can simplify here because everything is relevant (no wasted builds).
2018-09-03 21:38:27 -04:00
Jovan Popovic e7ba3054c8 Configured Belgrade Sql client to return data (#1066) 2018-07-19 20:30:23 +01:00
Andrey Dorokhov 17ffdc2437 Fix benchmark description typos (#932) 2018-02-01 18:33:25 -05:00
Nick Craver 98c94c561c Misc build analyzer fixups 2017-09-14 10:02:00 -04:00
Nick Craver 071a3fd5a0 .editorconfig and formatting 2017-08-21 16:25:48 -04:00
Nick Craver 01c6a13967 Merge remote-tracking branch 'origin/master' into netstandard2 2017-08-20 15:46:39 -04:00
Nick Craver 4637c10097 Upgade libs, fix tests
This uses the new non-parallel-at-the-end I added to xUnit in https://github.com/xunit/xunit/pull/1411 This way we can run any global test that are other-test-unfriendly much more easily.
2017-08-20 14:06:27 -04:00
Nick Craver ee0b246f34 Perf: add EntityFramework Core to legacy tests 2017-06-02 11:37:05 -04:00
James Law 3c14c8b660 Added EntityFrameworkCore performance tests (#778) 2017-06-02 11:24:39 -04:00
Nick Craver fb443385ad Try and use BenchmarkDotNet correctly
OperationsPerInvoke is an informational, not instructional property.
What we actually want is the UnrollFactor. Moved into the job definition
to simplify things.
2017-05-14 13:31:27 -04:00
Nick Craver ea6b193406 Benchmarks: performance and formatting 2017-05-12 21:14:02 -04:00
Nick Craver 7e5bd308f9 netstandard2.0 functionality (w/ runtime breaks)
This adds a netstandard2.0 build to Dapper (and StrongName until v2),
adds a netstandard2.0 test lineup, restores most functionality (except
UDTs for SQL, e.g. .UdtTypeName isn't in netstandard2), and also breaks
things not actually implemented or implemented correctly in
netstandard2.0. Pushing this up so we can work through these with the
.NET teams.

Several things are still broken here (and fail tests):
- Parameter decimal values (not filed yet)
- DataTables as parameters
(https://github.com/dotnet/corefx/issues/19708)
- .GetSchemaTable() (not yet filed, implementation is completely missing
from SqlDataReader in CoreFX)

While the compile is clean, the above are runtime issues.
`SqlParameter.UdtTypeName` is a separate issue, that one just wasn't in
`netstandard2.0` at all...so we can't support UDTs there until it is.
See https://github.com/dotnet/corefx/issues/17126 for details.
2017-05-12 10:03:00 -04:00
Nick Craver d3ab338c78 Benchmarks: customization and formatting
More cleanup to do (removing Type column next), but getting to some very
usable output now.
2017-05-11 18:14:37 -04:00
Nick Craver 0a8fcd9806 Benchmarks v2: BenchmarkDotNet and friends
This is based on BenchmarkDotNet (while preserving the legacy format
with minor improvements as well - legacy runs much faster). See #666 for
details. Not an ominus number at all.

Note: this code will get a bit simpler with BenchmarkDotNet categories,
see https://github.com/dotnet/BenchmarkDotNet/issues/248 for details.
2017-05-11 09:05:25 -04:00
Nick Craver 4d75b98206 Tests: make analyzers happy because why not 2017-05-08 14:47:36 -04:00
Nick Craver f613234413 Lots of code cleanup, no functional changes 2017-05-07 15:49:01 -04:00
Nick Craver 4be8df7988 Lots of documentation fixes/additions. 2017-05-06 18:57:10 -04:00
Nick Craver ae7a29a9f1 VS 2017 .csproj Migration
Due to the way VS test works (by injecting an executable entry point), the performance tests needed to be factored out. I also organized all of our existing tests better along the way.
Actual code changes to Dapper itself are very minor, only formatting and documentation fixes (which we need many more of).

The build.ps1 script is upated to work, but note that <frameworkAssemblies> is not working in .nuspec inside the packages in the new .csproj system. I consider this to be a blocker. Issue is here: https://github.com/NuGet/Home/issues/4853
2017-03-25 19:34:10 -04:00