What are good tools for determining where a program is spending the most wallclock time?

CURATOR: Jack Smith

ANSWER: [Katia] Benchmarking/profiling tools are specific for each application:
For a program written in c and compiled with gcc compiler, one can use gprof :http://sourceware.org/binutils/docs/gprof/.
There are a number of other popular profilers.

For R script the basic profiling can be done using Rprof() function: http://stat.ethz.ch/R-manual/R-devel/library/utils/html/Rprof.html which comes with base R. However there are some other very helpful tools like proftools library https://cran.r-project.org/web/packages/proftools/index.html and profvis library https://rstudio.github.io/profvis/

Python just like R comes with profiling tools: https://docs.python.org/2/library/profile.html and just like R there are some additional packages that might be helpful to graphically determine the bottleneck: http://pycallgraph.slowchop.com/en/master/

MATLAB has its own built-in profiler.

[deleted - obsolete]

COMMENTARY: Could you please explain what you are trying to do? And why you want to find out about the wallclock time?