kingkong
kingkong

Reputation: 11

profiling valgrind itself

Can we measure the ratio of time it takes to run a program natively and under Valgrind?

Upvotes: 1

Views: 145

Answers (2)

neuro
neuro

Reputation: 15180

I suggest you :

time myprogram

then

time valgrind myprogram

And some basic calculation ;)

my2c

Upvotes: 0

Nicolas
Nicolas

Reputation: 1116

man time:

time - time a simple command or give resource usage

So, something like:

  1. time valgrind --tool=foo ./bar
  2. time ./bar

This will give you the total, user and system times for that command to complete. You can then do the calculation yourself.

Upvotes: 1

Related Questions