lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [4863] Report elapsed time for system test


From: Greg Chicares
Subject: [lmi-commits] [4863] Report elapsed time for system test
Date: Sun, 25 Apr 2010 21:31:23 +0000

Revision: 4863
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4863
Author:   chicares
Date:     2010-04-25 21:31:23 +0000 (Sun, 25 Apr 2010)
Log Message:
-----------
Report elapsed time for system test

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/main_cli.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-04-25 21:30:22 UTC (rev 4862)
+++ lmi/trunk/ChangeLog 2010-04-25 21:31:23 UTC (rev 4863)
@@ -25044,7 +25044,21 @@
 20100424T2350Z <address@hidden> [755]
 
   rounding_rules.cpp
-  rounding_rules.hpp
 Fix defect introduced 20070221T0307Z. See (B) here:
   http://lists.nongnu.org/archive/html/lmi/2010-04/msg00040.html
 
+20100425T2129Z <address@hidden> [755]
+
+  rounding_rules.cpp
+Improve documentation.
+
+20100425T2130Z <address@hidden> [755]
+
+  workhorse.make
+Refine system-test analysis.
+
+20100425T2131Z <address@hidden> [755]
+
+  main_cli.cpp
+Report elapsed time for system test.
+

Modified: lmi/trunk/main_cli.cpp
===================================================================
--- lmi/trunk/main_cli.cpp      2010-04-25 21:30:22 UTC (rev 4862)
+++ lmi/trunk/main_cli.cpp      2010-04-25 21:31:23 UTC (rev 4863)
@@ -70,9 +70,16 @@
 // and incompatible headers.
 void LMI_SO print_databases();
 
-//============================================================================
-void RegressionTest()
+/// Run a suite of test cases.
+///
+/// Run every file with extension
+///   '.cns', '.ini', or '.mec'
+/// in a given system-testing directory, emitting data appropriate for
+/// automated comparison with previously-saved results.
+
+void system_test()
 {
+    Timer timer;
     global_settings::instance().set_regression_testing(true);
     fs::path test_dir(global_settings::instance().regression_test_directory());
     fs::directory_iterator i(test_dir);
@@ -112,6 +119,7 @@
             report_exception();
             }
         }
+    std::cout << "system_test(): " << timer.stop().elapsed_msec_str() << 
std::endl;
 }
 
 /// Spot check and time some insurance calculations.
@@ -120,7 +128,7 @@
 /// production system's, so no assertions are made about them; but the
 /// speed difference is interesting.
 
-void SelfTest()
+void self_test()
 {
     bool const antediluvian = timestamp_of_production_release().empty();
 
@@ -195,16 +203,16 @@
         ;
 }
 
-//============================================================================
-void Profile()
+/// Run self-test repeatedly (intended for use with 'gprof').
+
+void profile()
 {
     for(int j = 0; j < 10; ++j)
         {
-        SelfTest();
+        self_test();
         }
 }
 
-//============================================================================
 void process_command_line(int argc, char* argv[])
 {
     // TRICKY !! Some long options are aliased to unlikely octal values.
@@ -509,19 +517,19 @@
 
     if(run_selftest)
         {
-        SelfTest();
+        self_test();
         return;
         }
 
     if(run_regression_test)
         {
-        RegressionTest();
+        system_test();
         return;
         }
 
     if(run_profile)
         {
-        Profile();
+        profile();
         return;
         }
 
@@ -559,7 +567,6 @@
         }
 }
 
-//============================================================================
 int try_main(int argc, char* argv[])
 {
     initialize_filesystem();





reply via email to

[Prev in Thread] Current Thread [Next in Thread]