diff options
author | Paolo Carlini <paolo@gcc.gnu.org> | 2003-12-16 22:57:57 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2003-12-16 22:57:57 +0000 |
commit | da2fd9486bd98bcef61a94ebc8abd536c10d682d (patch) | |
tree | 6965d486034c35081964b7b504e5006dc1d0555c | |
parent | 89c5711036511bfa8d87512d3d6a42385fc416b2 (diff) | |
download | gcc-da2fd9486bd98bcef61a94ebc8abd536c10d682d.zip gcc-da2fd9486bd98bcef61a94ebc8abd536c10d682d.tar.gz gcc-da2fd9486bd98bcef61a94ebc8abd536c10d682d.tar.bz2 |
container_benchmark.cc: New...
2003-12-16 Paolo Carlini <pcarlini@suse.de>
* testsuite/performance/container_benchmark.cc: New, a
benchmark developed by Bjarne Stroustrup and Alexander
Stepanov and made available with no restrictions.
* testsuite/testsuite_performance.h (report_header): New,
useful to produce header lines in the reports.
From-SVN: r74717
-rw-r--r-- | libstdc++-v3/testsuite/testsuite_performance.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/testsuite_performance.h b/libstdc++-v3/testsuite/testsuite_performance.h index 9ec2f86..a736fcf 100644 --- a/libstdc++-v3/testsuite/testsuite_performance.h +++ b/libstdc++-v3/testsuite/testsuite_performance.h @@ -197,6 +197,25 @@ namespace __gnu_test out << std::endl; out.close(); } + + void + report_header(const std::string file, const std::string header) + { + const char space = ' '; + const char tab = '\t'; + const char* name = "libstdc++-performance.sum"; + std::string::const_iterator i = file.begin() + file.find_last_of('/') + 1; + std::string testname(i, file.end()); + + std::ofstream out(name, std::ios_base::app); + + out.setf(std::ios_base::left); + out << std::setw(25) << testname << tab; + out << std::setw(25) << header << tab; + + out << std::endl; + out.close(); + } }; // namespace __gnu_test #endif // _GLIBCXX_PERFORMANCE_H |