Software for timing a program

Software for timing a program

I have realized that I spend a lot of time running my program (obviously through shell or python scripts), collecting data, and then analyzing the collected data. This involves running the program a multiple times, taking the average of reported times, and storing the data in a spreadsheet followed by applying aggregation operators etc., to get the results of interest. Finally, these results are exported to prepare Charts and Tables. I wonder if there is a tool which can take my program and the parameters and run it for a set of parameters (similar to a script) and present the data over a number of runs after aggregating.Any help will be appreciated.

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Maybe a profiler would work for you?
This one isn't free (except the Linux version for non-commercial use) but you can try out a trial version or you look for a free one like AMD's CodeAnalyst (though not all functions will work on non-AMD CPUs for example).

Thank you for your response. However, the issue with a profiler is that I do not want it to time everything. For instance, my program measures the time it takes only after memory allocations and all initialization operations have finished.What I want is a program that can take my executable files or source code, run it based on provided parameters, calculate the average time for a number of runs and gives the chart out. Moreover, it should be able to change the parameters so that I can try my program for different parameters.I do this by using scripts and store the output in a spreadsheet - which is time consuming. Therefore, I can use little automation there. I wonder if everyone collects timing using scripts or they use a program for this task.

Hi,For testing a software here are a few available tools:-1. NDepend -> whichis a Visual Studio tool to manage complex .NET code and achieve highCode Quality. With NDepend, software quality can be measured usingCode Metrics, visualized usingGraphs and Treemaps, and enforced usingstandard and custom Rules.2. klocwork ->Klocwork Insightis astatic code analysistool thats used to identify quality and security issues forC,C++,JavaandC#. The product includes numerous desktop plug-ins for developers, an architecture analysis tool, and metrics and reporting.3. sofcheck ->TheSofCheck Inspectoris astatic analysistool forJavaandAda. It statically determines and documents thepre-andpostconditionsofJavamethods orAdasubprograms, and uses that information to identify logic flaws,race conditions, and redundant code in an individual Java class or Ada package, a subsystem, or a complete program.I think this is what you have been looking for.Regards,Shashi Sinha

You can go for random parameter generation in a python script,run it n number of times and measure the time consumed using timeit()function.You can directly create a CSV of the data collected.

You can use VTune for that purpose.

Leave a Comment

Please sign in to add a comment. Not a member? Join today