Thread: [Compbench-devel] CompBenchmarks++/Benchmark Benchmark.cpp, 1.18, 1.19 Benchmark-DLLoader.cpp, 1.4,
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-01-04 18:56:17
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5434 Modified Files: Benchmark.cpp Benchmark-DLLoader.cpp Benchmark.h Package.cpp Package.h Log Message: Improvements and adapations for CBMPackage and new related API usage. Index: Benchmark.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Benchmark.h 3 Jan 2007 21:58:38 -0000 1.13 --- Benchmark.h 4 Jan 2007 18:56:13 -0000 1.14 *************** *** 50,53 **** --- 50,56 ---- public: + /** Display informations about benchmark + */ + void display(void); /** Benchmark name \return a std::string representing current benchmark's identification Index: Benchmark-DLLoader.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark-DLLoader.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Benchmark-DLLoader.cpp 3 Jan 2007 22:02:28 -0000 1.4 --- Benchmark-DLLoader.cpp 4 Jan 2007 18:56:13 -0000 1.5 *************** *** 56,60 **** dlclose(library); if (UO_verbose) ! std::cout << "N.A." << std::endl; delete(r); return(0); --- 56,60 ---- dlclose(library); if (UO_verbose) ! std::cout << "Invalid" << std::endl; delete(r); return(0); *************** *** 68,72 **** } else { if (UO_verbose) ! std::cout << "N.A." << std::endl; } return(0); --- 68,72 ---- } else { if (UO_verbose) ! std::cout << "N.A. (" << dlerror() << ")" << std::endl; } return(0); Index: Package.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Package.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Package.cpp 3 Jan 2007 21:57:31 -0000 1.1 --- Package.cpp 4 Jan 2007 18:56:13 -0000 1.2 *************** *** 28,31 **** --- 28,41 ---- } + int CBMPackage::benchmarkNumber(void) + { + return(benchmarks.size()); + } + + CBMBenchmark *CBMPackage::Benchmark(int i) + { + return(Benchmark(benchmarks[i])); + } + CBMBenchmark *CBMPackage::Benchmark(std::string bid) { *************** *** 33,36 **** --- 43,58 ---- } + void CBMPackage::display(void) + { + std::cout << "package::Name=" << packageName() << std::endl + << "package::Url=" << downloadURL() << std::endl + << "package::Size=" << packageSize() << std::endl + << "package::Version=" << packageVersion() << std::endl + << "package::Comments=" << packageComments() << std::endl + << "package::License=" << license() << std::endl + << "package::Homepage=" << homePage() << std::endl + << "package::Author=" << author() << std::endl << std::endl; + } + CBMSystem *CBMPackage::System(void) { Index: Package.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Package.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Package.h 3 Jan 2007 21:57:31 -0000 1.1 --- Package.h 4 Jan 2007 18:56:13 -0000 1.2 *************** *** 169,172 **** --- 169,175 ---- CBMCompilerOptions *_currentOptions); public: + /** Display informations about package */ + virtual void display(void); + /** Get system abstraction object \return CBMSystem *************** *** 176,180 **** /** Get all supported benchmarks. \return Array of std::string. */ ! BenchmarkVector& Benchmarks(void); /** Get a benchmark according to its identifier. --- 179,192 ---- /** Get all supported benchmarks. \return Array of std::string. */ ! virtual BenchmarkVector& Benchmarks(void); ! ! /** Get supported benchmarks' number ! \return An integer */ ! virtual int benchmarkNumber(void); ! ! /** Get a benchmark according to its index ! \sa Benchmarks() ! \return A pointer to the benchmark instance */ ! virtual class CBMBenchmark *Benchmark(int i); /** Get a benchmark according to its identifier. Index: Benchmark.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Benchmark/Benchmark.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Benchmark.cpp 3 Jan 2007 21:58:38 -0000 1.18 --- Benchmark.cpp 4 Jan 2007 18:56:13 -0000 1.19 *************** *** 1,4 **** --- 1,5 ---- #include <Benchmark/Benchmark.h> #include <Benchmark/Package.h> + #include <iostream> #include <cloptions.h> *************** *** 10,13 **** --- 11,25 ---- } + void CBMBenchmark::display(void) + { + std::cout << "benchmark::Name=" << benchmarkName() << std::endl + << "benchmark::Package=" << Package()->packageName() << std::endl + << "benchmark::Language=" << Package()->language() << std::endl + << "benchmark::Size=" << Package()->benchmarkSize() << std::endl + << "benchmark::Status=" << Package()->getStatus() << std::endl + << "benchmark::Comments=" << benchmarkComments() << std::endl + << std::endl; + } + CBMPackage *CBMBenchmark::Package(void) { |