[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subverion Performance Tests

From: <kbrannen_at_gte.net>
Date: 2002-11-13 05:17:40 CET

Brandon Ehle wrote:
> First off, does anyone know of a way to get the maximum memory used of a
> process? I'd like to add that to these results.
...
> Tests run on:
> Redhat 8.0

If you know where the process ends, add in code like:

system("ps -auxww > /tmp/ps.out");

just before it exits and look at the VSZ and RSS columns for your process in
the ps.out file. If you don't know where the code ends, then create a
function that does the above, then at the top of main(), add a call to
atexit() with an arg of the function pointer to your "ps function". That's
the quickest way I can think of.

The only other way I can quickly think of is to open up the correct file in
/proc, but that takes root privileges (not impossible, just not desireable.
:-) But this is where ps gets it's data from, just you might as well do that.

There's a function called getrusage() that might work for you, but I've never
used it, so I don't really know how helpful it will be (but the man page makes
it look good).

HTH,
Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 13 05:15:15 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.