Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: SethP Newsgroups: comp.os.linux.development.apps Subject: algorithm benchmarking Date: Sat, 4 Feb 2012 15:14:49 -0800 (PST) Organization: http://groups.google.com Lines: 26 Message-ID: <17766052.2213.1328397289309.JavaMail.geo-discussion-forums@vbtq34> Reply-To: comp.os.linux.development.apps@googlegroups.com NNTP-Posting-Host: 108.46.104.160 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1328397762 29854 127.0.0.1 (4 Feb 2012 23:22:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 4 Feb 2012 23:22:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.46.104.160; posting-account=yMneTQoAAAAH5zAtymAWh3C07y-leXRz User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:415 Hi there, I'd like to benchmark some algorithms and while I'm an experienced coder, l= inux internals is definitely not my area of expertise, so I have some quest= ions: 1. Is there a solution I'm unaware of that already does this? 2. Assuming there isn't, what would be a good way to benchmark the algorith= m with: a) an accurate picture of the peak memory usage and utime b) a simple interface for the algorithm to implement My current idea is to have the benchmarking tool start the algorithm implem= entation as a child process, then get its /proc/PID/status mem info as a ba= seline, then send the child a signal to tell it to start, and then wait for= the algorithm to send a signal indicating it's finished, then get its proc= info again and then kill it. So the algorithm implementation would need to = adhere to the signaling spec and sleep when it's done and that's it. Is this really dumb? I obviously have no idea what I'm talking about; I'd j= ust like to measure as close to the algorithm as possible to get accurate b= enchmarks, without imposing a lot of complexity on the algorithm implemente= r. Thanks for any help! Seth