当前位置: 首页 > news >正文

嘉兴企业网站制作w3school网页制作证书

嘉兴企业网站制作,w3school网页制作证书,pi币最新消息,上海网页制作机构BenchmarkDotNet是一款开源的性能测试工具#xff0c;使用方式非常简单#xff0c;特别是对实现同一功能的两种方式#xff0c;犹豫不决时#xff0c;可以使用它进行个对比。比如我们比较ADO.NET方式查询数据库表#xff0c;和用Dapper方式获取数据为表#xff0c;只需要… BenchmarkDotNet是一款开源的性能测试工具使用方式非常简单特别是对实现同一功能的两种方式犹豫不决时可以使用它进行个对比。比如我们比较ADO.NET方式查询数据库表和用Dapper方式获取数据为表只需要在两个方法上增加 [Benchmark]就可以了然后调用var summary BenchmarkRunner.RunCycle();就实现了性能测试。using System; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Security.Cryptography; using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Running; using Dapper;namespace MyBenchmarks {public class Product{public string Name { get; set; }public string ProductNumber { get; set; }public bool MakeFlag { get; set; }public bool FinishedGoodsFlag { get; set; }public string Color { get; set; }public short SafetyStockLevel { get; set; }public short ReorderPoint { get; set; }public decimal StandardCost { get; set; }public decimal ListPrice { get; set; }public string Size { get; set; }public string SizeUnitMeasureCode { get; set; }public string WeightUnitMeasureCode { get; set; }public double Weight { get; set; }public int DaysToManufacture { get; set; }public string ProductLine { get; set; }public string Class { get; set; }public string Style { get; set; }public int ProductSubcategoryID { get; set; }public int ProductModelID { get; set; }public DateTime SellStartDate { get; set; }public DateTime SellEndDate { get; set; }public DateTime DiscontinuedDate { get; set; }public Guid rowguid { get; set; }public DateTime ModifiedDate { get; set; }}public class Cycle{[Benchmark]public void DapperTest(){var conn new SqlConnection(Data Source.;Initial CatalogAdventureWorks2016;Persist Security InfoTrue;User IDsa;passwordsa;);var table conn.QueryProduct(select top 100 * from production.product);}[Benchmark]public void CommandTest(){var conn Data Source.;Initial CatalogAdventureWorks2016;Persist Security InfoTrue;User IDsa;passwordsa;;var sql select top 100 * from production.product;var dapp new SqlDataAdapter(sql, conn);var table new DataTable();dapp.Fill(table);}}public class Program{public static void Main(string[] args){var summary BenchmarkRunner.RunCycle();}} } 运行一下看一下结果为了减少篇幅删除了一些结果从结果看出为了得到较为客观的性能测试结果BenchmarkDotNet还是做了很多工作的OverheadJittingWorkloadJittingWorkloadPilotOverheadWarmupOverheadActualWorkloadWarmupWorkloadActualWorkloadResult。并且通过最后的一个表格清楚的给出了结果。同时还给出了Warnings 以供参考。// Validating benchmarks: // ***** BenchmarkRunner: Start ***** // ***** Found 2 benchmark(s) in total ***** // ***** Building 1 exe(s) in Parallel: Start ***** // start dotnet restore /p:UseSharedCompilationfalse /p:BuildInParallelfalse /m:1 /p:Deterministictrue /p:Optimizetrue in C:\MyFile\Source\Repos\Asp.NetCoreExperiment\Asp.NetCoreExperiment\BenchmarkDotNet\Demo01\bin\Release\net6.0\03bf0209-ac26-4de1-b763-4ba03e46cf4d // command took 2.83s and exited with 0 // start dotnet build -c Release --no-restore /p:UseSharedCompilationfalse /p:BuildInParallelfalse /m:1 /p:Deterministictrue /p:Optimizetrue in C:\MyFile\Source\Repos\Asp.NetCoreExperiment\Asp.NetCoreExperiment\BenchmarkDotNet\Demo01\bin\Release\net6.0\03bf0209-ac26-4de1-b763-4ba03e46cf4d // command took 4.29s and exited with 0 // ***** Done, took 00:00:07 (7.52 sec) ***** // Found 2 benchmarks: // Cycle.DapperTest: DefaultJob // Cycle.CommandTest: DefaultJob// ************************** // Benchmark: Cycle.DapperTest: DefaultJob // *** Execute *** // Launch: 1 / 1 // Execute: dotnet 03bf0209-ac26-4de1-b763-4ba03e46cf4d.dll --benchmarkName MyBenchmarks.Cycle.DapperTest --job Default --benchmarkId 0 in C:\MyFile\Source\Repos\Asp.NetCoreExperiment\Asp.NetCoreExperiment\BenchmarkDotNet\Demo01\bin\Release\net6.0\03bf0209-ac26-4de1-b763-4ba03e46cf4d\bin\Release\net6.0 // BeforeAnythingElse// Benchmark Process Environment Information: // Runtime.NET 6.0.0 (6.0.21.25307), X64 RyuJIT // GCConcurrent Workstation // Job: DefaultJobOverheadJitting 1: 1 op, 229700.00 ns, 229.7000 us/op WorkloadJitting 1: 1 op, 410021000.00 ns, 410.0210 ms/opWorkloadWarmup 1: 1 op, 4581600.00 ns, 4.5816 ms/op WorkloadWarmup 2: 1 op, 746500.00 ns, 746.5000 us/op WorkloadWarmup 3: 1 op, 830000.00 ns, 830.0000 us/op WorkloadWarmup 4: 1 op, 822900.00 ns, 822.9000 us/op WorkloadWarmup 5: 1 op, 741800.00 ns, 741.8000 us/op WorkloadWarmup 6: 1 op, 746900.00 ns, 746.9000 us/op WorkloadWarmup 7: 1 op, 826300.00 ns, 826.3000 us/op WorkloadWarmup 8: 1 op, 698300.00 ns, 698.3000 us/op// BeforeActualRun WorkloadActual 1: 1 op, 755100.00 ns, 755.1000 us/op …… WorkloadActual 100: 1 op, 712700.00 ns, 712.7000 us/op// AfterActualRun WorkloadResult 1: 1 op, 755100.00 ns, 755.1000 us/op …… WorkloadResult 95: 1 op, 712700.00 ns, 712.7000 us/op// AfterAll // Benchmark Process 26724 has exited with code 0Mean 753.054 us, StdErr 11.687 us (1.55%), N 95, StdDev 113.909 us Min 578.400 us, Q1 668.600 us, Median 734.900 us, Q3 798.800 us, Max 1,052.600 us IQR 130.200 us, LowerFence 473.300 us, UpperFence 994.100 us ConfidenceInterval [713.353 us; 792.754 us] (CI 99.9%), Margin 39.701 us (5.27% of Mean) Skewness 0.87, Kurtosis 2.93, MValue 3.63// ************************** // Benchmark: Cycle.CommandTest: DefaultJob // *** Execute *** // Launch: 1 / 1 // Execute: dotnet 03bf0209-ac26-4de1-b763-4ba03e46cf4d.dll --benchmarkName MyBenchmarks.Cycle.CommandTest --job Default --benchmarkId 1 in C:\MyFile\Source\Repos\Asp.NetCoreExperiment\Asp.NetCoreExperiment\BenchmarkDotNet\Demo01\bin\Release\net6.0\03bf0209-ac26-4de1-b763-4ba03e46cf4d\bin\Release\net6.0 // BeforeAnythingElse// Benchmark Process Environment Information: // Runtime.NET 6.0.0 (6.0.21.25307), X64 RyuJIT // GCConcurrent Workstation // Job: DefaultJobOverheadJitting 1: 1 op, 215400.00 ns, 215.4000 us/op WorkloadJitting 1: 1 op, 339247500.00 ns, 339.2475 ms/opWorkloadWarmup 1: 1 op, 3680100.00 ns, 3.6801 ms/op WorkloadWarmup 2: 1 op, 943000.00 ns, 943.0000 us/op WorkloadWarmup 3: 1 op, 875200.00 ns, 875.2000 us/op WorkloadWarmup 4: 1 op, 982500.00 ns, 982.5000 us/op WorkloadWarmup 5: 1 op, 956900.00 ns, 956.9000 us/op WorkloadWarmup 6: 1 op, 1030800.00 ns, 1.0308 ms/op WorkloadWarmup 7: 1 op, 1170900.00 ns, 1.1709 ms/op WorkloadWarmup 8: 1 op, 1169400.00 ns, 1.1694 ms/op// BeforeActualRun WorkloadActual 1: 1 op, 975400.00 ns, 975.4000 us/op …… WorkloadActual 100: 1 op, 897400.00 ns, 897.4000 us/op// AfterActualRun WorkloadResult 1: 1 op, 975400.00 ns, 975.4000 us/op …… WorkloadResult 91: 1 op, 897400.00 ns, 897.4000 us/op// AfterAll // Benchmark Process 17300 has exited with code 0Mean 951.263 us, StdErr 13.676 us (1.44%), N 91, StdDev 130.465 us Min 759.300 us, Q1 864.000 us, Median 912.900 us, Q3 1,004.600 us, Max 1,316.000 us IQR 140.600 us, LowerFence 653.100 us, UpperFence 1,215.500 us ConfidenceInterval [904.736 us; 997.789 us] (CI 99.9%), Margin 46.526 us (4.89% of Mean) Skewness 0.95, Kurtosis 3.05, MValue 2.44// ***** BenchmarkRunner: Finish *****// * Export *BenchmarkDotNet.Artifacts\results\MyBenchmarks.Cycle-report.csvBenchmarkDotNet.Artifacts\results\MyBenchmarks.Cycle-report-github.mdBenchmarkDotNet.Artifacts\results\MyBenchmarks.Cycle-report.html// * Detailed results * Cycle.DapperTest: DefaultJob Runtime .NET 6.0.0 (6.0.21.25307), X64 RyuJIT; GC Concurrent Workstation Mean 753.054 us, StdErr 11.687 us (1.55%), N 95, StdDev 113.909 us Min 578.400 us, Q1 668.600 us, Median 734.900 us, Q3 798.800 us, Max 1,052.600 us IQR 130.200 us, LowerFence 473.300 us, UpperFence 994.100 us ConfidenceInterval [713.353 us; 792.754 us] (CI 99.9%), Margin 39.701 us (5.27% of Mean) Skewness 0.87, Kurtosis 2.93, MValue 3.63 -------------------- Histogram -------------------- [ 545.635 us ; 582.035 us) | [ 582.035 us ; 650.935 us) | [ 650.935 us ; 726.135 us) | [ 726.135 us ; 791.665 us) | [ 791.665 us ; 852.365 us) | [ 852.365 us ; 924.365 us) | [ 924.365 us ; 1,009.685 us) | [1,009.685 us ; 1,085.365 us) | ---------------------------------------------------Cycle.CommandTest: DefaultJob Runtime .NET 6.0.0 (6.0.21.25307), X64 RyuJIT; GC Concurrent Workstation Mean 951.263 us, StdErr 13.676 us (1.44%), N 91, StdDev 130.465 us Min 759.300 us, Q1 864.000 us, Median 912.900 us, Q3 1,004.600 us, Max 1,316.000 us IQR 140.600 us, LowerFence 653.100 us, UpperFence 1,215.500 us ConfidenceInterval [904.736 us; 997.789 us] (CI 99.9%), Margin 46.526 us (4.89% of Mean) Skewness 0.95, Kurtosis 3.05, MValue 2.44 -------------------- Histogram -------------------- [ 721.230 us ; 780.280 us) | [ 780.280 us ; 860.730 us) | [ 860.730 us ; 936.870 us) | [ 936.870 us ; 1,020.120 us) | [1,020.120 us ; 1,080.630 us) | [1,080.630 us ; 1,170.980 us) | [1,170.980 us ; 1,247.120 us) | [1,247.120 us ; 1,277.930 us) | [1,277.930 us ; 1,354.070 us) | ---------------------------------------------------// * Summary *BenchmarkDotNetv0.13.0, OSWindows 10.0.19043.1052 (21H1/May2021Update) Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores .NET SDK6.0.100-preview.4.21255.9[Host] : .NET 6.0.0 (6.0.21.25307), X64 RyuJIT [AttachedDebugger]DefaultJob : .NET 6.0.0 (6.0.21.25307), X64 RyuJIT| Method | Mean | Error | StdDev | Median | |------------ |---------:|---------:|---------:|---------:| | DapperTest | 753.1 us | 39.70 us | 113.9 us | 734.9 us | | CommandTest | 951.3 us | 46.53 us | 130.5 us | 912.9 us |// * Warnings * MultimodalDistributionCycle.DapperTest: Default - It seems that the distribution is bimodal (mValue 3.63) EnvironmentSummary - Benchmark was executed with attached debugger MinIterationTimeCycle.DapperTest: Default - The minimum observed iteration time is 578.4000 us which is very small. Its recommended to increase it to at least 100.0000 ms using more operations.Cycle.CommandTest: Default - The minimum observed iteration time is 759.3000 us which is very small. Its recommended to increase it to at least 100.0000 ms using more operations.// * Hints * OutliersCycle.DapperTest: Default - 5 outliers were removed (1.06 ms..2.17 ms)Cycle.CommandTest: Default - 9 outliers were removed (1.37 ms..2.51 ms)// * Legends *Mean : Arithmetic mean of all measurementsError : Half of 99.9% confidence intervalStdDev : Standard deviation of all measurementsMedian : Value separating the higher half of all measurements (50th percentile)1 us : 1 Microsecond (0.000001 sec)// ***** BenchmarkRunner: End ***** // ** Remained 0 benchmark(s) to run ** Run time: 00:00:03 (3.12 sec), executed benchmarks: 2Global total time: 00:00:10 (10.65 sec), executed benchmarks: 2 // * Artifacts cleanup *
http://www.pierceye.com/news/947779/

相关文章:

  • 医疗网站前置审批要多长时间营销型外贸网站广州
  • 哈尔滨网站建设oeminc购买手表网站
  • 营销推广公司兰州seo培训
  • 南城网站建设公司php购物网站开发实例源码
  • 无锡网站备案百度应用市场
  • 高端房产网站建设上传空间网站
  • 上海城建建设官方网站中企动力网站价格
  • 网站建设中国十强阜阳网站制作公司多少钱
  • 网站建设公司 温州虚拟机电脑网页版
  • 网站建设原理与实践深建市住房和城乡建设局网站
  • 南通建设招聘信息网站平面设计工作室怎么接单
  • 手机网站开发技巧wordpress网站外包
  • 南昌外贸网站建设宿州做企业网站
  • 专题网站建站给医院做网站赚钱吗
  • 泉州市做网站网站建设培训需要多少钱
  • 网站开发的外文翻译静态网站制作视频
  • 小企业做网站有用吗大气网站首页欣赏
  • 常见的企业网站有哪些苏州网站建设一站通
  • 陕西省高速公路建设集团公司网站外包网站开发 收费
  • 免费做网站刮刮卡腾讯html网页制作软件
  • 网站快照网站反链一般怎么做
  • 山东东营建设网官方网站专做h5的公司网站
  • 电商网站建设题库做海岛旅游类网站的背景及意义
  • 网站开发后台框架wordpress 文章同步微信
  • 小型网站有哪些怎么搭建自己的网站
  • 注册网站域名的入口网站开发公司的
  • vs2012 建网站光明区公明街道
  • 公司网站建设属于什么职位杭州专业seo公司
  • 网站SEO容易做吗网络链接推广
  • 建立免费公司网站自适应型网站建设费用