execution-time

What is the best way to measure execution time of a function?

Obviously I can do and DateTime.Now.After - DateTime.Now.Before but there must be something more sophisticated. Any tips appreciated. ...

PHP Function execution cost table

There is a reference table that shows the execution cost of every php function? I know that the time execution is boundet to many factors and is impossible to determinate an unique value, but im looking for a 'ideological' table. For example, is_dir() = cost 3 is_file() = cost 2 (take it JUST as an example ;) If i dont remember bad...

php profiling: what results are normal?

As testing server, my computer (Windows 7, Amd Athlon X2, 1 GB RAM) is used. My application is based on Zend Framework. It uses MySQL and Zend_Translation, and Memcached as cache. I'm getting execution time of my PHP application with simple microtime(): Execution time 0.086215972900391 (when db and translation data is cached) I want t...

mysql execution time

Is there a way to get the execution time of the last executed query in mysql? ...

How much mail() function can be used in 30sec execution time?

I have to made a page which will send Email to Newsletter subscribers. There is more then 14000 subscriber. I want to use php mail() function to send Email to them. But I'm afraid that it will not be able to send email to all subscribers for php 30sec max_execution_time limit. Its not possible to test how much Email can be sent by sendin...

Write code for execution time on C# Command Line Application

I want to have my program execute a bunch of commands on load-time and this is in C# btw, but it's a console program, how can I do that? ...

execution time of a stored procedure

What is the age old method of testing execution time of stored procedures on informix 11.5. I am thinking of doing something like this from a unix prompt: $ time (echo 'execute procedure foo(1)' | dbaccess ...) Any other ideas? ...

Problem with function session_start() (works slowly).

Hi. I have a problem wtih session_start() on primary server. When I load page for the first time, it takes less than 1 second to complete request. If I'll wait for approximately 12-15 seconds and then reload page, time of loading will be the same. But when I'm trying to refresh page after, for example, 3 or 5 seconds after initial loadi...

C# 2.0 Execution Time Timer

I would like to be able to calculate the amount of time a number of functions take to execute. I was thinking about using some type of stopwatch class. I can call start/stop before and after each function call, however that seems horribly ugly to me. Is there a way to do this without a stopwatch class? Can something in the Reflections c...

C programming, how can I get execution time of a program in milliseconds?

Hello, Currently I'm getting execution wall time of my program in seconds by calliing: time_t startTime = time(NULL); //section of code time_t endTime = time(NULL); double duration = difftime(endTime,startTime); Is it possible to get the wall time in milliseconds? If so how? Thanks in advance! alex ...

Coldfusion CFC creation taking a variable amout of time to execute.

I've been doing some logging of object creation times in our open account process in production. Periodically, initializing an object would take way longer than expected. By initializing I mean calling it's init() and passing a couple of arguments that may be simple variables or objects. e.g. <cfset validateObj = createObject("component...

What is considered a long execution time?

I am trying to figure out just how "efficient" my server-side code is. Using start and end microtime(true) values, I am able to calculate the time it took my script to run. I am getting times from .3 - .5 seconds. These scripts do a number of database queries to return different values to the user. What is considered an efficient exec...

Timing program execution

I have a project written in C and I would like to know if there is a simple way to profile its execution time and memory usage under Windows. Thanks in advance. ...

Negative execution time

I wrote a little program that solves 49151 sudoku's within an hour for an assignment, but we had to time it. I thought I'd just let it run and then check the execution time, but it says -1536.087 s. I'm guessing it has to do with the timer being some signed dataype or something, but I have no idea what datatype is used for the timer in t...

For simple C cmd programs: how to add "program executed in 12,345 seconds" ?

I'm a windows user, and I'm learning C. I use Codeblocks and visual c++ 2008 express at home to write simple C command line programs (I'm a beginner) and I find really useful when codeblocks adds a few lines at the end with the time it takes (example: "Process returned 0 (0x0) execution time : 6.848 s"). I want to add this functionali...

RSA encryption results in server execution timeout

Hi, I am using PHP Crypt_RSA (http://pear.php.net/package/Crypt_RSA) for encrypting and decrypting the contents. Contents are of 1kb size. Following are the results: keylength = 1024 Encryption function takes time: 225 secs keylength = 2048 Encryption function takes time: 115 secs I need to reduce this execution time as most...

mysql query execution time - can i get this in milliseconds?

I'm comparing a few different approaches to getting some data in mysql, directly at the console, using the SQL_NO_CACHE option to make sure mysql keeps running the full query every time. Mysql gives me the execution time back in seconds, to two decimal places. I'd really like to get the result back in milliseconds (ideally to one or tw...

Detecting maximum execution time in Runtime

I've seen a lot of questions regarding this error in PHP. But everywhere the solution is given as to set the time limit. But what I want to do is, to detect the error and if it occurs then switch to another course of action. I mean, if my requests exceed my maximum time set, then it should not give an error message and stop but continue...

PHP: Coding long-running scripts when servers impose an execution time limit

FastCGI servers, for example, impose an execution time limit on PHP scripts which cannot be altered using set_time_limit() in PHP. IIS does this too I believe. I wrote an import script for a PHP application that works well under mod_php but fails under FastCGI (mod_fcgid) because the script is killed after a certain number of seconds. ...

microsecond profiler for C code

Does any body know of C code profiler like gprof which gives function call times in microseconds instead of milliseconds? ...