1

I'm trying to test the performance of an algorithm I wrote in C++. I use my university calculation cluster (via SGE)

The problem is that I don't know when the server is full or not with other calculations and so I can't measure the effective User time (I'm supposing it doesn't change whenever the process is so busy or not, am I wrong ?)

Isn't the usertime the time used to calculate and compare the time performance between algorithms ? Because I don't get the same result for the same execution

sohaibafifi
  • 745
  • 7
  • 16

3 Answers3

1

If you're on a time share the algorithm's run-time will vary from run to run.

Have you tried the shell time command?

time [MY PROGRAM]

or, for significantly more information, the GNU Time command?

/usr/bin/time <MY PROGRAM> [ARGS]

These commands would be an easy place to start and will provide you some of the information you need.

Also, you mention a cluster, perhaps you are using MPI or another framework? Perhaps this framework has some built-in timing commands (I'm not sure if such things exist, but it may be worth looking into).

Richard
  • 56,349
  • 34
  • 180
  • 251
  • SGE in my case do a simple work, it affects jobs to the less used node, I'm not using any framework. And all the output of time command change depending on the system load – sohaibafifi Dec 10 '12 at 18:35
0

For comparing performance metrics, you really want to cut through the noise that is "user time." There are plenty of good profiling tools out there. You could see if your university has one of them available for your use.

Community
  • 1
  • 1
Michael Kristofik
  • 34,290
  • 15
  • 75
  • 125
0

You can write small standard test. This test will represent "1". Then yours complex application will be measured relatively. For example your application will take 4 times of standard test. You need to run standard test and application at same time.

Andrew
  • 541
  • 3
  • 5