Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of Orm performance Test in .NET

Shulou Source: shulou.com Published: 2022-06-03 17:05:49 11月13日 Update

This article mainly introduces the example analysis of Orm performance testing in .NET, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article.

Brief introduction

The main purpose of the OrmBenchmark project is to test the time-consuming situation of major Orm queries against SqlServer databases and converting the data into required POCO objects (well, it's actually not complete orm, it's more like SqlMapper.)

Test results:

.NetFramework 4.6 has warm-up

.NetFramework 4.6 does not warm up

.net Core 2.0 has preheating.

.NET Core 2.0 does not warm up

Overall, the performance of Dapper is quite strong.

More details:

Net Framework

Net Core

Performance testing

The performance test results are obtained in the following tests:

Repeat the performance test of a sql command (500 times):

Execute a select statement and map the returned data to the POCO object for more than 500 iterations

Performance test for mapping database records to POCO objects (5000 rows):

Performance of mapping 5000 rows returned by a select to a POCO object in one iteration

Get test results

Download the project directly, run it to get the results, and you can add your favorite ORM framework to the project.

Thank you for reading this article carefully. I hope the article "sample Analysis of Orm performance testing in .NET" shared by the editor will be helpful to you. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!

Tags: Testing performance objects data articles results projects examples analysis databases more and will iterative tough lieutenant general value interest at the same time commands actual Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Redmi Xiaomi Apple Huawei