$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r83565 - trunk/tools/regression/src/report
From: steven_at_[hidden]
Date: 2013-03-25 16:05:21
Author: steven_watanabe
Date: 2013-03-25 16:05:21 EDT (Mon, 25 Mar 2013)
New Revision: 83565
URL: http://svn.boost.org/trac/boost/changeset/83565
Log:
Don't store timestamps in the zip archive.  Don't include the report time in the links pages.  Drastically improves rsync (>10x) for the release report.
Text files modified: 
   trunk/tools/regression/src/report/boost_report.cpp |     2                                         
   trunk/tools/regression/src/report/links_page.cpp   |    41 +++++++++++---------------------------- 
   trunk/tools/regression/src/report/links_page.hpp   |     1                                         
   trunk/tools/regression/src/report/zip.hpp          |    14 +++++++++++-                            
   4 files changed, 25 insertions(+), 33 deletions(-)
Modified: trunk/tools/regression/src/report/boost_report.cpp
==============================================================================
--- trunk/tools/regression/src/report/boost_report.cpp	(original)
+++ trunk/tools/regression/src/report/boost_report.cpp	2013-03-25 16:05:21 EDT (Mon, 25 Mar 2013)
@@ -94,7 +94,7 @@
                     std::cout << "Generating links pages" << std::endl;
                     // must be run before test_results is discarded
                     if(reports.count("l"))
-                        links_page(now, markup, *test_run);
+                        links_page(markup, *test_run);
                 } catch(std::ios_base::failure& e) {
                     std::cerr << e.what() << std::endl;
                 } catch(boost::property_tree::detail::rapidxml::parse_error& e) {
Modified: trunk/tools/regression/src/report/links_page.cpp
==============================================================================
--- trunk/tools/regression/src/report/links_page.cpp	(original)
+++ trunk/tools/regression/src/report/links_page.cpp	2013-03-25 16:05:21 EDT (Mon, 25 Mar 2013)
@@ -21,8 +21,7 @@
 
 namespace {
 
-void links_page(const boost::posix_time::ptime& run_date,
-                const failures_markup_t& explicit_markup,
+void links_page(const failures_markup_t& explicit_markup,
                 const std::string& runner_id,
                 const std::string& revision,
                 const boost::posix_time::ptime& timestamp,
@@ -34,15 +33,13 @@
                                    const std::string& variants_file_path,
                                    const std::string release_postfix);
 std::string output_page_header(node_ptr test_log, const std::string& runner_id);
-void write_variants_file(const boost::posix_time::ptime& run_date,
-                         const failures_markup_t& explicit_markup,
+void write_variants_file(const failures_markup_t& explicit_markup,
                          const std::string& path,
                          const std::vector<test_structure_t::test_log_t>& test_logs,
                          const std::string& runner_id,
                          const std::string& revision,
                          const boost::posix_time::ptime& timestamp);
-void write_test_result_file(const boost::posix_time::ptime& run_date,
-                            const failures_markup_t& explicit_markup,
+void write_test_result_file(const failures_markup_t& explicit_markup,
                             const std::string& path,
                             const test_structure_t::test_log_t& test_log,
                             const std::string& runner_id,
@@ -51,8 +48,7 @@
 void write_test_results_reference_file(const std::string& path, const std::string& log_file_path);
 
 // requires: revision must be a SVN revision.  i.e. of the form nnnnn
-void links_page(const boost::posix_time::ptime& run_date,
-                const failures_markup_t& explicit_markup,
+void links_page(const failures_markup_t& explicit_markup,
                 const std::string& runner_id,
                 const std::string& revision,
                 const boost::posix_time::ptime& timestamp,
@@ -70,7 +66,7 @@
 
         std::string variants_file_path = output_file_path(runner_id + "-" + library_name + "-" + toolset_name + "-" + test_name + "-variants");
 
-        write_variants_file(run_date, explicit_markup, variants_file_path, test_logs, runner_id, revision, timestamp);
+        write_variants_file(explicit_markup, variants_file_path, test_logs, runner_id, revision, timestamp);
 
         BOOST_FOREACH(const std::string& release_postfix, postfixes) {
             BOOST_FOREACH(const std::string& directory, dirs) {
@@ -85,7 +81,7 @@
 
         if(show_output(explicit_markup, test_log)) {
             std::string log_path = log_file_path(explicit_markup, test_log, runner_id);
-            write_test_result_file(run_date, explicit_markup, log_path, test_log, runner_id, revision, timestamp);
+            write_test_result_file(explicit_markup, log_path, test_log, runner_id, revision, timestamp);
             
             BOOST_FOREACH(const std::string& release_postfix, postfixes) {
                 BOOST_FOREACH(const std::string& directory, dirs) {
@@ -130,8 +126,7 @@
 
 // requires revision is an SVN revision #
 // requires path is a valid path
-void write_variants_file(const boost::posix_time::ptime& run_date,
-                         const failures_markup_t& explicit_markup,
+void write_variants_file(const failures_markup_t& explicit_markup,
                          const std::string& path,
                          const std::vector<test_structure_t::test_log_t>& test_logs,
                          const std::string& runner_id,
@@ -142,7 +137,7 @@
     html_writer document(path);
 
     std::string component = output_page_header(test_logs[0], runner_id);
-    int age = timestamp_difference(timestamp, run_date);
+    int age = 0; // timestamp_difference(timestamp, run_date);
 
     document << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\">\n"
                 "<html>\n"
@@ -161,10 +156,6 @@
                 "            </span></div>\n"
                 "        </div>\n"
                 "\n"
-                "        <div>\n"
-                "            <b>Report Time: </b> " << format_timestamp(run_date) << "\n"
-                "        </div>\n"
-                "\n"
                 "        <p>Output by test variants:</p>\n"
                 "        <table>\n";
 
@@ -208,8 +199,7 @@
 
 // requires: path is a valid path
 // requires: revision is an SVN revision
-void write_test_result_file(const boost::posix_time::ptime& run_date,
-                            const failures_markup_t& explicit_markup,
+void write_test_result_file(const failures_markup_t& explicit_markup,
                             const std::string& path,
                             const test_structure_t::test_log_t& test_log,
                             const std::string& runner_id,
@@ -221,7 +211,7 @@
     html_writer document(path);
     
     std::string component = output_page_header(test_log, runner_id);
-    int age = timestamp_difference(timestamp, run_date);
+    int age = 0; // timestamp_difference(timestamp, run_date);
     
     document << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\">\n"
                 "<html>\n";
@@ -241,10 +231,6 @@
                 "                " << format_timestamp(timestamp) << "\n"
                 "            </span></div>\n"
                 "        </div>\n";
-
-    document << "        <div>\n"
-                "            <b>Report Time: </b> " << format_timestamp(run_date) << "\n"
-                "        </div>\n";
     
     if(!test_log.notes.empty()) {
 
@@ -332,15 +318,13 @@
 
 // okay
 void boost::regression::links_page(
-    const boost::posix_time::ptime& run_date,
     const failures_markup_t& explicit_markup,
     const test_structure_t::run_t& test_run)
 {
     BOOST_FOREACH(const test_structure_t::toolset_group_t::const_reference toolset, test_run.toolsets) {
         BOOST_FOREACH(const test_structure_t::toolset_t::const_reference library, toolset.second) {
             BOOST_FOREACH(const test_structure_t::library_t::const_reference test_case, library.second) {
-                ::links_page(run_date,
-                             explicit_markup,
+                ::links_page(explicit_markup,
                              test_run.runner,
                              test_run.revision,
                              test_run.timestamp,
@@ -354,8 +338,7 @@
     BOOST_FOREACH(const test_structure_t::toolset_group_t::const_reference toolset, test_run.non_test_case_targets) {
         BOOST_FOREACH(const test_structure_t::toolset_t::const_reference library, toolset.second) {
             BOOST_FOREACH(const test_structure_t::library_t::const_reference test_case, library.second) {
-                ::links_page(run_date,
-                             explicit_markup,
+                ::links_page(explicit_markup,
                              test_run.runner,
                              test_run.revision,
                              test_run.timestamp,
Modified: trunk/tools/regression/src/report/links_page.hpp
==============================================================================
--- trunk/tools/regression/src/report/links_page.hpp	(original)
+++ trunk/tools/regression/src/report/links_page.hpp	2013-03-25 16:05:21 EDT (Mon, 25 Mar 2013)
@@ -16,7 +16,6 @@
 namespace regression {
 
 void links_page(
-    const boost::posix_time::ptime& run_date,
     const failures_markup_t& explicit_markup,
     const test_structure_t::run_t& test_run);
 
Modified: trunk/tools/regression/src/report/zip.hpp
==============================================================================
--- trunk/tools/regression/src/report/zip.hpp	(original)
+++ trunk/tools/regression/src/report/zip.hpp	2013-03-25 16:05:21 EDT (Mon, 25 Mar 2013)
@@ -73,6 +73,17 @@
             self = 0;
             archive.open_file(path, creator_version, minimum_required_version, flags, compression_method, modification_time, this);
         }
+
+        file_handle(zip_archive& archive,
+                    const std::string& path,
+                    boost::uint16_t creator_version,
+                    boost::uint16_t minimum_required_version,
+                    boost::uint16_t flags,
+                    boost::uint16_t compression_method) 
+        {
+            self = 0;
+            archive.open_file(path.data(), path.size(), creator_version, minimum_required_version, flags, compression_method, 0, 0, this);
+        }
         ::std::streamsize write(const char* data, ::std::streamsize size) {
             assert(self != 0);
             self->output_file.write(data, size);
@@ -729,8 +740,7 @@
 
     zip_member_sink(zip_archive& archive, const std::string& path)
       : file(archive, path, 10, 10, 0,
-             compression_method<Filter>::value,
-             boost::posix_time::second_clock::local_time()) {}
+             compression_method<Filter>::value) {}
     ~zip_member_sink() {
         close();
     }