The default maximum execution time in php.ini is 30 seconds, which is specified by the Max_execution_time variable in php.ini, if you have a job that takes a lot of time to complete, such as sending lots of emails to a large number of senders, or
The examples in this article describe the classes that the PHP implementation uses to compute execution times. Share to everyone for your reference. Specifically as follows:
With this PHP class, the calculation function or a piece of code execution
Core code
starttime=this->getmicrotime ();
}
function display ()//Displays the time of the page execution
{
this->stoptime=this->getmicrotime ();
this->spendtime=this->stoptime-this->starttime;
Return round (this->spendtime,10);
}
/*
A class is written to test the execution time of the target function. The following is the definition code for the class:
Copy Code code as follows:
/**
* Class Efficiencytester
* Efficiency tester, test function run time
* @version 1
Calc
calc is an asynchronous function that we want to do profiling (profiling). By convention, its last argument is one callback . We use it like this calc :
Calc (ARG, (err, res) => Console.log (Err | | res))
Perhaps the simplest calc
First, the preface
As for spring AOP, I'm not going to go into this, I'm just a handful of people on the web, and everyone who has used spring knows spring's IOC and AOP. IOC we often use, but in our own system, AOP is used almost zero, except for
Preface
In order to achieve performance tuning, you need to first count the execution time of each method, directly before and after the log output is too cumbersome, you can use AOP to add time statistics added dependencies
In PHP, most time formats are represented by a Unix timestamp, while the UNIX timestamp is the unit of measure time with a minimum of s (seconds). This is not accurate enough for some applications, so you can call Microtime () to return the current
You can print SQL statements based on the execution time, and the printed SQL statements are parameterized and can be copied to the Query Analyzer what's directly running
Copy Code code as follows:
Package mybatis;
Import
No more details, please see the following code examples to explain
Here's a function of summation, and we need to know the time it takes to execute this function.
function Add () {
var sum = 0;
for (var i = 0;i
Define a test
Function Name: GettimeoverFunction: Page Execution timeParameters: Flag---Display time units 1= seconds, otherwise milliseconds****************************************************Public Function gettimeover (flag)Dim EndtimeIf flag = 1
In the Java project, some configuration parameters are saved in the property file, so that the original code is not modified to directly modify the property file.Propertyparser.javaPackage Com.discover.parse;import Java.io.file;import
Open profiling, default is not turned on.set profiling=1;Execute the SQL statement to parseselect count(1from wechat_employee,Employee;Show Profiles Tablemysql> show profiles;Query Result:+----------+------------+-------------------------------------
1. DescriptionWhen it comes to using data, we need a lot of databases, and we want to use time to make table names to differentiate. However, MySQL does not support the use of variable names for table names or column names in stored procedures.For
Php:It is usually the beginning of the code you want to check to record a time, the end of the record a time. Take the difference value,the efficiency of database SQLSQL explain (MySQL), enable slow query log to record slow queries. Usually also
C is a static language, and it works by means of function calls, so that at compile time we have determined how the program executes. While Objective-c is a dynamic language, it does not invoke the method of the class to perform the function, but
[MySQL] using Profiles to view the execution time consumption of the create statement
1. view the status value of profiles1. Check whether profiles is enabled. By default, profiles is disabled.
Mysql> show variables like '% pro % ';
I checked
Set_time_limit (0 );The number in the brackets indicates the execution time. If the number is zero, the execution is permanently performed until the program ends. If the number is greater than zero, the program ends regardless of whether the program
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.