This article is a mirror article of machine translation, please click here to jump to the original article.

View: 6027|Reply: 3

[.NET Core] ASP.NET Core (17) integrates MiniProfile application performance analysis

[Copy link]
Posted on 2023-4-23 20:22:49 | | | |
Requirements: When developing a web website application, developers must care about the performance of the website (this article refers to the access speed), if the website access speed is very slow, users may give up and choose other websites, and 57% of users will leave after 3 seconds!

MiniProfiler is a library and UI for analyzing your application. By letting you see where your time is spent, what queries are running, and any other custom time you want to add, MiniProfiler can help you debug issues and optimize performance.

The information monitored by MiniProfiler can be stored in memory, MongoDb, MySql, SqlServer, Redis, PostgreSql, and many other storage media. Support for ORMs such as EF, EFCore, NHibernate, etc., which can monitor the executed SQL and execution time, making it easy to optimize SQL.

MiniProfiler Official Website:The hyperlink login is visible.
MiniProfiler GitHub open source address:The hyperlink login is visible.

This article uses aASP.NET Core 6project to test, nuget installs the package as follows:

Register the following services in Program.cs (using the default configuration) with the following code:

Using the MiniProfiler middleware, the code is as follows:

at_ViewImports.cshtmlAdd a quote as follows:

Add the MiniProfiler to your view master page, the default file is:_Layout.cshtml, the code is as follows:

This tag generates the following HTML source code.



When you try to run the project, you can see the time-consuming statistics in the upper left corner, as shown below:



Click the share link to see the details, as shown below:



(End)




Previous:WinForm loading animation effect
Next:Network cable designation for network problem troubleshooting (Category 5 and Category 6 network cables).
 Landlord| Posted on 2023-4-23 20:24:07 |
review

ASP.NET Core (16) Dependent on injection of dynamic registration services
https://www.itsvse.com/thread-10560-1-1.html

ASP.NET Core (XV) uses HttpClient to send HTTP requests
https://www.itsvse.com/thread-10311-1-1.html

ASP.NET Core (fourteen) is based on the SkiaSharp image captcha
https://www.itsvse.com/thread-10287-1-1.html

ASP.NET Core (XIII) to determine whether it is an Ajax request or not
https://www.itsvse.com/thread-10284-1-1.html

ASP.NET Core (twelve) front-end JS, CSS bundling, and compression
https://www.itsvse.com/thread-10282-1-1.html

ASP.NET Core (XI) endpoint route adds middleware to display all DI services
https://www.itsvse.com/thread-10269-1-1.html

ASP.NET Detailed explanation of Configuration priorities in Core(10).
https://www.itsvse.com/thread-10265-1-1.html

ASP.NET Detailed explanation of the Middleware middleware of Core (9).
https://www.itsvse.com/thread-9647-1-1.html

ASP.NET Detailed explanation of Core Middleware
https://www.itsvse.com/thread-8126-1-1.html

ASP.NET pit of the default parameters of the Swagger UI in Core(8).
https://www.itsvse.com/thread-9640-1-1.html

ASP.NET Core (7) In-depth analysis of the framework source code
https://www.itsvse.com/thread-9601-1-1.html

ASP.NET Core (VI) DI manually obtains the method of injecting objects
https://www.itsvse.com/thread-9595-1-1.html

ASP.NET Core (five) is based on CAP distributed transactions
https://www.itsvse.com/thread-9593-1-1.html

ASP.NET Core(4) filter unified ModelState model validation
https://www.itsvse.com/thread-9589-1-1.html

ASP.NET Core (iii) Dynamically create instances using ActivatorUtilities
https://www.itsvse.com/thread-9488-1-1.html

ASP.NET Core (2) Restart the application by code
https://www.itsvse.com/thread-9480-1-1.html

ASP.NET Core (1) uses Redis caching
https://www.itsvse.com/thread-9393-1-1.html
Posted on 2023-4-24 10:41:42 |
Learn it
Posted on 2023-4-28 11:23:58 |
Very good and powerful, thanks for sharing
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com