Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.glorb.com!newsgate.cuhk.edu.hk!news.netfront.net!reversiblemaps.ath.cx!not-for-mail From: Jasen Betts Newsgroups: comp.os.linux.development.apps Subject: Re: algorithm benchmarking Date: 7 Feb 2012 11:11:12 GMT Organization: Dis (not Dat) Organisation Lines: 32 Message-ID: References: <17766052.2213.1328397289309.JavaMail.geo-discussion-forums@vbtq34> NNTP-Posting-Host: 118.90.98.113 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: adenine.netfront.net 1328614245 57402 118.90.98.113 (7 Feb 2012 11:30:45 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Tue, 7 Feb 2012 11:30:45 +0000 (UTC) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-18 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:417 On 2012-02-04, SethP wrote: > Hi there, > > I'd like to benchmark some algorithms and while I'm an experienced coder, linux internals is definitely not my area of expertise, so I have some questions: > > My current idea is to have the benchmarking tool start the algorithm > implementation as a child process, then get its /proc/PID/status mem > info as a baseline, 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 procinfo 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'm impressed. > I obviously have no idea what I'm talking > about; I'd just like to measure as close to the algorithm as possible > to get accurate benchmarks, without imposing a lot of complexity on > the algorithm implementer. another way would be to get the implementor to code the algorithm as a shared library and use dlopen to plug it into the test suite, this gives tighter control of the start state, and more room for verifying the result... -- ⚂⚃ 100% natural --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---