Author: gadamopoulos
Date: Sun Feb 5 20:56:21 2012
New Revision: 55441
URL:
http://svn.reactos.org/svn/reactos?rev=55441&view=rev
Log:
[rosautotest]
- When rosautotest is launched, show how much time has past since the machine has started
- Also show how much time each individual test need to complete
- The purpose of this feature isn't to benchmark the os but to let us spot regressions
regarding test time
Modified:
trunk/rostests/rosautotest/CWineTest.cpp
trunk/rostests/rosautotest/main.cpp
trunk/rostests/rosautotest/precomp.h
Modified: trunk/rostests/rosautotest/CWineTest.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/CWineTest.cpp…
==============================================================================
--- trunk/rostests/rosautotest/CWineTest.cpp [iso-8859-1] (original)
+++ trunk/rostests/rosautotest/CWineTest.cpp [iso-8859-1] Sun Feb 5 20:56:21 2012
@@ -263,10 +263,14 @@
bool BreakLoop = false;
DWORD BytesAvailable;
DWORD Temp;
- stringstream ss;
+ stringstream ss, ssFinish;
+ DWORD StartTime = GetTickCount();
+ float TotalTime;
ss << "Running Wine Test, Module: " << TestInfo->Module
<< ", Test: " << TestInfo->Test << endl;
StringOut(ss.str());
+
+ StartTime = GetTickCount();
{
/* Execute the test */
@@ -305,6 +309,11 @@
}
while(!BreakLoop);
}
+
+ TotalTime = ((float)GetTickCount() - StartTime)/1000;
+ ssFinish << "Test " << TestInfo->Test << "
completed in ";
+ ssFinish << setprecision(2) << fixed << TotalTime << "
seconds." << endl;
+ StringOut(ssFinish.str());
}
/**
Modified: trunk/rostests/rosautotest/main.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/main.cpp?rev=…
==============================================================================
--- trunk/rostests/rosautotest/main.cpp [iso-8859-1] (original)
+++ trunk/rostests/rosautotest/main.cpp [iso-8859-1] Sun Feb 5 20:56:21 2012
@@ -51,10 +51,16 @@
try
{
+ stringstream ss;
+
/* Set up the configuration */
Configuration.ParseParameters(argc, argv);
Configuration.GetSystemInformation();
Configuration.GetConfigurationFromFile();
+
+ ss << "\n\nSystem uptime " << setprecision(2) <<
fixed ;
+ ss << ((float)GetTickCount()/1000) << " seconds\n";
+ StringOut(ss.str());
/* Run the tests */
WineTest.Run();
Modified: trunk/rostests/rosautotest/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/rosautotest/precomp.h?rev…
==============================================================================
--- trunk/rostests/rosautotest/precomp.h [iso-8859-1] (original)
+++ trunk/rostests/rosautotest/precomp.h [iso-8859-1] Sun Feb 5 20:56:21 2012
@@ -4,6 +4,7 @@
#include <sstream>
#include <string>
#include <vector>
+#include <iomanip>
using namespace std;