[Compbench-devel] CompBenchmarks++/Benchmark Package.cpp, 1.8, 1.9 Package.h, 1.8, 1.9
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-01-22 17:21:23
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27968 Modified Files: Package.cpp Package.h Log Message: buildTime() method added to get last make() duration in seconds. Index: Package.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Package.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Package.cpp 21 Jan 2007 21:16:02 -0000 1.8 --- Package.cpp 22 Jan 2007 17:21:14 -0000 1.9 *************** *** 469,473 **** if (r) { end=system->Time(); ! std::cout << "Build time : " << (double) (end-beg) << std::endl; storeStatus(Made); storeContext(currentCompiler, --- 469,474 ---- if (r) { end=system->Time(); ! lastBuildTime=(double) (end-beg); ! std::cout << "Build time : " << lastBuildTime << std::endl; storeStatus(Made); storeContext(currentCompiler, *************** *** 483,486 **** --- 484,492 ---- } + std::string Package::buildTime(void) + { + return(lastBuildTime); + } + int Package::Test(int _force) { Index: Package.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Package.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Package.h 21 Jan 2007 21:16:02 -0000 1.8 --- Package.h 22 Jan 2007 17:21:15 -0000 1.9 *************** *** 59,62 **** --- 59,65 ---- Status status; + /** \sa buildTime() */ + std::string lastBuildTime; + /** Expected MD5 on downloaded package * \return MD5 expected, as an std::string */ *************** *** 348,359 **** --- 351,371 ---- * Uses make(). Overloading is unadvised. * This step won't be done and'll return 1 if getStatus()>=Package::Made. + * Updates lastBuildTime. * \param _force sets to 1 to force operation. May changes status. * \return 1 if ok. May changes status. * \sa Configure() * \sa Release() + * \sa buildTime() * \sa status * \sa ContextMatches() */ virtual int Make(int _force = 0); + /** Give build time. + * Returns last time (in seconds) of make(). + * \return build time in seconds + * \sa Make() + * \sa make() */ + virtual std::string buildTime(void); + /** Test a package. * Test a built package. |