0

Is there any performance tool that has the ability to measure code speed or the time of execution for a particular function?

For example, I want to measure the speed of my Save() function.

Right now, I'm exploring IBM RPT it shows good results like Server Throughput, Page Throughput and even live performance measurement but it cannot measure code speed.

Can anybody suggest a tool capable of doing as such?

1
  • 3
    what do you mean by "code speed"?
    – Yu Zhang
    Commented Feb 7, 2017 at 2:43

1 Answer 1

1

Either look at Benchmarking or Profiling.

Profiling:

Most IDE's support profiling:

In software engineering, profiling ("program profiling", "software profiling") is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, the usage of particular instructions, or the frequency and duration of function calls.

The profiler measures how long each function call costs and gives you a nice report. This would be the way to check what your Save() function is doing for how long.

Which profiler to use is programming language depended so you need to do some research or ask a more specific question with programming language details.

Profiling more a developer task then a tester task, but performance is a key issue in software quality so understanding these concepts makes sense.

Benchmark:

In computing, a benchmark is the act of running a computer program, a set of programs, or other operations, in order to assess the relative performance of an object, normally by running a number of standard tests and trials against it. The term 'benchmark' is also mostly utilized for the purposes of elaborately designed benchmarking programs themselves.

In this case you may use an end-to-end testing tool and record the length of the test-case and record this as a benchmark. In the future you compare test-runs to this benchmark to see if it became slower or faster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.