Time Registration Requests

What is the best way to register HTTP requests for a web application, including ajax requests, so I can come back later and ask "I want to know how many times this request was made, and how long it took to complete on average," or "show me the best The 5 Highest Average Time Requests

Are you using a separate database from the current production database to register these things in order to prevent all of these inserts causing I / O to slow down, or does this ultimately have little effect?

Will you fill out the queries and then click on the database or will you do one insert for each query?

Is there a better way to add this request to the timings log, in addition to wrap each request handler in the application logic, for example:

start = CurrentTime()
/* request handler code */
end = CurrentTime()
Insert(requestName, start, (end - start))
+3
source share
3 answers

For this purpose you can use the logs of your web server. Apache and IIS register as capture URL, request string, response code, and duration. If AJAX requests data via HTTP POST, you will need to reconfigure the web server to collect this data, if this is important to you. Then the best tool I found for log analysis is Microsoft Log Parser , which does great work with large files with SQL syntax to calculate the answers to the questions you ask.

, , - . , log4J - , -, , . , . , , , .

+4

, Google Analytics (. , ).

, :

  • , , . script 1x1 , ( ) .

  • , . . (, Google Analytics , Google .)

+2

- , , , , , MongoDB. = , .

:

NoSQ LMovement, LINQ MongoDB

ASP.NET MVC, . , ASP.NET- ( nonASP.NET) IIS 7 +.

If NoSQL / MongoDB is not your thing, you can use SqlCommand.BeginExecuteNonQuery for insertions, and not for a blocking call. If you insert into the same DB as the production, you may cause some disagreement there.

+1
source

All Articles