From 31b813cd7e0319aaa9949251be0fd797208b3fac Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 20 Mar 2009 16:38:16 +0000 Subject: [PATCH] 2009-03-20 17:33 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * tests/bnchmark + tests/bnchmark/bnch_win.bat + Added speedtst comparison tool, featuring: - CPU + physical memory info dump from WMI - Tasklist before and after test runs - Harbour /build info included in output - Complete dump of commands executed, hbmk2 output - Dir listing of tested .exes - All tests repeated three times by default (configurable) - 8 slots maximum to compare different speedtst scenarios - By default it will run -st vs. -mt tests. ; Please read the comments in the file for usage instructions. Here's an example for parameter setup: -- set PATH=C:\devl\MinGW-432\bin;%PATH% set HB_BENCH_RUNS=3 set HB_RUN_FLAGS=--exclude=030 set HB_CMP_FLAGS_1=-gc2 set HB_CMP_FLAGS_2=-gc3 call bnch_win.bat > results.txt 2>&1 -- * config/rules.cf + Restored -ko flag. Thanks Mindaugas for analysing test result. * contrib/hbodbc/todbc.prg * contrib/hbodbc/odbc.c * Formatting + minor cleanups. --- harbour/ChangeLog | 30 +++++++ harbour/config/rules.cf | 2 +- harbour/contrib/hbodbc/odbc.c | 30 +++---- harbour/contrib/hbodbc/todbc.prg | 127 ++++++++++++---------------- harbour/tests/bnchmark/bnch_win.bat | 115 +++++++++++++++++++++++++ 5 files changed, 213 insertions(+), 91 deletions(-) create mode 100644 harbour/tests/bnchmark/bnch_win.bat diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9ae83027be..1f52448d87 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,36 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-20 17:33 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * tests/bnchmark + + tests/bnchmark/bnch_win.bat + + Added speedtst comparison tool, featuring: + - CPU + physical memory info dump from WMI + - Tasklist before and after test runs + - Harbour /build info included in output + - Complete dump of commands executed, hbmk2 output + - Dir listing of tested .exes + - All tests repeated three times by default (configurable) + - 8 slots maximum to compare different speedtst scenarios + - By default it will run -st vs. -mt tests. + ; Please read the comments in the file for usage instructions. + Here's an example for parameter setup: + -- + set PATH=C:\devl\MinGW-432\bin;%PATH% + set HB_BENCH_RUNS=3 + set HB_RUN_FLAGS=--exclude=030 + set HB_CMP_FLAGS_1=-gc2 + set HB_CMP_FLAGS_2=-gc3 + call bnch_win.bat > results.txt 2>&1 + -- + + * config/rules.cf + + Restored -ko flag. Thanks Mindaugas for analysing test result. + + * contrib/hbodbc/todbc.prg + * contrib/hbodbc/odbc.c + * Formatting + minor cleanups. + 2009-03-20 00:41 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + contrib/xhb/inet.h + Added from xhb. diff --git a/harbour/config/rules.cf b/harbour/config/rules.cf index 4e2ce5b0d9..23402952a7 100644 --- a/harbour/config/rules.cf +++ b/harbour/config/rules.cf @@ -29,7 +29,7 @@ HB := $(HB)harbour$(EXE_EXT) ifeq ($(HB_GCMODE),) HB_GCMODE=3 endif -HB_FLAGS := -i$(HB_INC_COMPILE) -q0 -w3 -es2 -km $(HB_PDBG) +HB_FLAGS := -i$(HB_INC_COMPILE) -q0 -w3 -es2 -kmo $(HB_PDBG) HB_RULE = $(HB) $? -n1 $(HB_FLAGS) -gc$(HB_GCMODE) $(HB_USER_PRGFLAGS) # The rule to link an executable. diff --git a/harbour/contrib/hbodbc/odbc.c b/harbour/contrib/hbodbc/odbc.c index ca4178485c..7f6c9839f8 100644 --- a/harbour/contrib/hbodbc/odbc.c +++ b/harbour/contrib/hbodbc/odbc.c @@ -80,10 +80,6 @@ #if !defined(HB_OS_DOS) && !defined(HB_OS_OS2) -#include -#include -#include - #if defined(HB_OS_LINUX) && defined(__WATCOMC__) #include "/usr/include/sql.h" #include "/usr/include/sqlext.h" @@ -112,8 +108,8 @@ #if defined(__DMC__) #define SQL_NO_DATA SQL_NO_DATA_FOUND #define SQLColAttribute SQLColAttributes - SQLRETURN SQL_API SQLFetchScroll(SQLHSTMT StatementHandle, - SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset); + SQLRETURN SQL_API SQLFetchScroll( SQLHSTMT StatementHandle, + SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset ); #endif HB_FUNC( SQLALLOCEN ) /* HB_SQLALLOCENV( @hEnv ) --> nRetCode */ @@ -206,22 +202,22 @@ HB_FUNC( SQLCONNECT ) /* HB_SQLCONNECT( hDbc, cDSN, cUseName, cPassword ) --> nR hb_retni( ret ); } -HB_FUNC( SQLDISCONN ) /* HB_SQLDISCONNECT( hDbc ) --> nRetCode */ +HB_FUNC( SQLDISCONN ) /* HB_SQLDISCONNECT( hDbc ) --> nRetCode */ { hb_retni( SQLDisconnect( ( HDBC ) hb_parptr( 1 ) ) ); } -HB_FUNC( SQLFREECON ) /* HB_SQLFREECONNECT( hDbc ) --> nRetCode */ +HB_FUNC( SQLFREECON ) /* HB_SQLFREECONNECT( hDbc ) --> nRetCode */ { hb_retni( SQLFreeConnect( ( HDBC ) hb_parptr( 1 ) ) ); } -HB_FUNC( SQLFREEENV ) /* HB_SQLFREEENV( hEnv ) --> nRetCode */ +HB_FUNC( SQLFREEENV ) /* HB_SQLFREEENV( hEnv ) --> nRetCode */ { hb_retni( SQLFreeEnv( ( HENV ) hb_parptr( 1 ) ) ); } -HB_FUNC( SQLALLOCST ) /* HB_SQLALLOCSTMT( hDbc, @hStmt ) --> nRetCode */ +HB_FUNC( SQLALLOCST ) /* HB_SQLALLOCSTMT( hDbc, @hStmt ) --> nRetCode */ { HSTMT hStmt; @@ -234,7 +230,7 @@ HB_FUNC( SQLFREESTM ) /* HB_SQLFREESTMT( hStmt, nType ) --> nRetCode */ hb_retni( SQLFreeStmt( ( HSTMT ) hb_parptr( 1 ), ( SQLUSMALLINT ) hb_parni( 2 ) ) ); } -HB_FUNC( SQLEXECDIR ) /* HB_SQLEXECDIRECT( hStmt, cStatement ) --> nRetCode */ +HB_FUNC( SQLEXECDIR ) /* HB_SQLEXECDIRECT( hStmt, cStatement ) --> nRetCode */ { #if defined( HB_OS_WIN ) && defined( UNICODE ) LPTSTR lpStr = HB_TCHAR_CONVTO( hb_parcx( 2 ) ); @@ -312,8 +308,7 @@ HB_FUNC( SQLGETDATA ) /* HB_SQLGETDATA( hStmt, nField, nType, nLen, @cBuffer ) - hb_retni( wResult ); } -/* HB_NUMRESULTCOLS( hStmt, @nColCount ) */ -HB_FUNC( SQLNUMRES ) +HB_FUNC( SQLNUMRES ) /* HB_NUMRESULTCOLS( hStmt, @nColCount ) */ { SQLSMALLINT nCols; WORD wResult = SQLNumResultCols( ( HSTMT ) hb_parptr( 1 ), &nCols ); @@ -324,8 +319,7 @@ HB_FUNC( SQLNUMRES ) hb_retni( wResult ); } -/* HB_SQLDESCRIBECOL( hStmt, nCol, @cName, nLen, @nBufferLen, @nDataType, @nColSize, @nDec, @nNull ) --> nRetCode */ -HB_FUNC( SQLDESCRIB ) +HB_FUNC( SQLDESCRIB ) /* HB_SQLDESCRIBECOL( hStmt, nCol, @cName, nLen, @nBufferLen, @nDataType, @nColSize, @nDec, @nNull ) --> nRetCode */ { SDWORD lLen = ( SDWORD ) hb_parnl( 4 ); SQLSMALLINT wBufLen = ( SQLUSMALLINT ) hb_parni( 5 ); @@ -373,8 +367,7 @@ HB_FUNC( SQLDESCRIB ) hb_retni( wResult ); } -/* SQLCOLATTRIBUTE( hStmt, nCol, nField, @cName, nLen, @nBufferLen, @nAttribute ) --> nRetCode */ -HB_FUNC( SQLCOLATTRIBUTE ) +HB_FUNC( SQLCOLATTRIBUTE ) /* SQLCOLATTRIBUTE( hStmt, nCol, nField, @cName, nLen, @nBufferLen, @nAttribute ) --> nRetCode */ { SDWORD lLen = ( SDWORD ) hb_parnl( 5 ); PTR bBuffer = hb_xgrab( lLen ); @@ -404,8 +397,7 @@ HB_FUNC( SQLCOLATTRIBUTE ) hb_retni( wResult ); } -/* HB_SQLEXTENDEDFETCH( hStmt, nOrientation, nOffset, @nRows, @nRowStatus ) */ -HB_FUNC( SQLEXTENDE ) +HB_FUNC( SQLEXTENDE ) /* HB_SQLEXTENDEDFETCH( hStmt, nOrientation, nOffset, @nRows, @nRowStatus ) */ { #if defined(__POCC__) || defined(__XCC__) SQLROWSETSIZE uiRowCountPtr = hb_parni( 4 ); diff --git a/harbour/contrib/hbodbc/todbc.prg b/harbour/contrib/hbodbc/todbc.prg index 9c34028ba6..8cf9f1a8d5 100644 --- a/harbour/contrib/hbodbc/todbc.prg +++ b/harbour/contrib/hbodbc/todbc.prg @@ -77,18 +77,15 @@ *+ *+-------------------------------------------------------------------- -CLASS TODBCField FROM HBClass +CREATE CLASS TODBCField FROM HBClass - DATA FieldID - DATA FieldName - DATA DataType - DATA DataSize - DATA DataDecs - DATA AllowNull - DATA Value - DATA OriginalType - DATA OriginalLen - DATA OriginalDec + VAR FieldID INIT -1 + VAR FieldName INIT "" + VAR DataType INIT -1 + VAR DataSize INIT -1 + VAR DataDecs INIT -1 + VAR AllowNull INIT .F. + VAR Value INIT NIL METHOD New() @@ -97,15 +94,6 @@ ENDCLASS /*-----------------------------------------------------------------------*/ METHOD New() CLASS TODBCField - - ::FieldId := - 1 - ::FieldName := "" - ::DataType := - 1 - ::DataSize := - 1 - ::DataDecs := - 1 - ::AllowNull := .F. - ::Value := NIL - RETURN Self *+-------------------------------------------------------------------- @@ -117,23 +105,23 @@ METHOD New() CLASS TODBCField CREATE CLASS TODBC FROM HBClass - DATA hEnv - DATA hDbc - DATA hStmt - DATA cODBCStr - DATA cODBCRes - DATA cSQL - DATA Active INIT .F. - DATA Fields INIT {} - DATA nEof INIT 0 - DATA lBof INIT .F. - DATA nRetCode - DATA nRecCount INIT 0 // number of rows in current recordset - DATA nRecNo INIT 0 // Current row number in current recordset - DATA lCacheRS // Do we want to cache recordset in memory - DATA aRecordSet INIT {} // Array to store cached recordset + VAR hEnv + VAR hDbc + VAR hStmt + VAR cODBCStr + VAR cODBCRes + VAR cSQL + VAR Active INIT .F. + VAR Fields INIT {} + VAR nEof INIT 0 + VAR lBof INIT .F. + VAR nRetCode + VAR nRecCount INIT 0 // number of rows in current recordset + VAR nRecNo INIT 0 // Current row number in current recordset + VAR lCacheRS // Do we want to cache recordset in memory + VAR aRecordSet INIT {} // Array to store cached recordset - DATA lAutoCommit AS LOGICAL INIT .T. // Autocommit is usually on at startup + VAR lAutoCommit AS LOGICAL INIT .T. // Autocommit is usually on at startup METHOD New( cODBCStr, cUserName, cPassword, lCache ) METHOD Destroy() @@ -334,7 +322,6 @@ METHOD Open() CLASS TODBC nRet := - 1 EXIT - ENDIF // SQL statement is mandatory @@ -345,7 +332,6 @@ METHOD Open() CLASS TODBC nRet := - 1 EXIT - ENDIF // Allocates and executes the statement @@ -436,7 +422,7 @@ METHOD ExecSQL() CLASS TODBC /*-----------------------------------------------------------------------*/ // Closes the dataset -METHOD CLOSE() CLASS TODBC +METHOD Close() CLASS TODBC // Frees the statement SQLFreeStm( ::hStmt, SQL_DROP ) @@ -444,7 +430,7 @@ METHOD CLOSE() CLASS TODBC // Reset all recordset related variables IF ::lCacheRS - ::aRecordSet := {} + ::aRecordSet := {} ENDIF ::nRecCount := 0 ::nRecNo := 0 @@ -544,7 +530,6 @@ METHOD Fetch( nFetchType, nOffset ) CLASS TODBC ELSE // apearently we don't have // nResult := SQLFetch( ::hStmt /*, nFetchType, nOffSet */) nResult := SQLExtende( ::hStmt, nFetchType, nOffSet, @nRows, 0 ) - ENDIF IF nResult == SQL_SUCCESS .OR. nResult == SQL_SUCCESS_WITH_INFO @@ -566,14 +551,14 @@ METHOD Next() CLASS TODBC LOCAL nResult := ::Fetch( SQL_FETCH_NEXT, 1 ) IF nResult == SQL_SUCCESS - ::nRecno := ::nRecno + 1 - IF ::nRecNo > ::nRecCount - ::nRecCount := ::nRecNo - ENDIF + ::nRecno := ::nRecno + 1 + IF ::nRecNo > ::nRecCount + ::nRecCount := ::nRecNo + ENDIF ELSEIF nResult == SQL_NO_DATA_FOUND .AND. ::nRecNo == ::nRecCount // permit skip on last row, so that EOF() can work properly - ::nRecno := ::nRecno + 1 + ::nRecno := ::nRecno + 1 ELSE - //TODO: Error handling + // TODO: Error handling ENDIF RETURN nResult @@ -586,13 +571,13 @@ METHOD Prior() CLASS TODBC LOCAL nResult := ::Fetch( SQL_FETCH_PRIOR, 1 ) IF nResult == SQL_SUCCESS - ::nRecno := ::nRecno - 1 + ::nRecno := ::nRecno - 1 ELSEIF nResult == SQL_NO_DATA_FOUND .AND. ::nRecNo == 1 // permit skip-1 on first row, so that BOF() can work properly - ::nRecno := ::nRecno - 1 - ::next() - ::lBof := .T. + ::nRecno := ::nRecno - 1 + ::next() + ::lBof := .T. ELSE - //TODO: Error handling + // TODO: Error handling ENDIF RETURN nResult @@ -605,9 +590,9 @@ METHOD First() CLASS TODBC LOCAL nResult := ::Fetch( SQL_FETCH_FIRST, 1 ) IF nResult == SQL_SUCCESS - ::nRecno := 1 + ::nRecno := 1 ELSE - //TODO: Error handling + // TODO: Error handling ENDIF RETURN nResult @@ -620,9 +605,9 @@ METHOD last() CLASS TODBC LOCAL nResult := ::Fetch( SQL_FETCH_LAST, 1 ) IF nResult == SQL_SUCCESS - ::nRecno := ::nRecCount + ::nRecno := ::nRecCount ELSE - //TODO: Error handling + // TODO: Error handling ENDIF RETURN nResult @@ -632,13 +617,13 @@ METHOD last() CLASS TODBC METHOD MoveBy( nSteps ) CLASS TODBC - //TODO: Check if nSteps goes beyond eof + // TODO: Check if nSteps goes beyond eof LOCAL nResult := ::Fetch( SQL_FETCH_RELATIVE, nSteps ) IF nResult == SQL_SUCCESS - ::nRecno := ::nRecNo + nSteps + ::nRecno := ::nRecNo + nSteps ELSE - //TODO: Error handling + // TODO: Error handling ENDIF RETURN nResult @@ -646,14 +631,14 @@ METHOD MoveBy( nSteps ) CLASS TODBC /*-----------------------------------------------------------------------*/ // Moves the DataSet to absolute record number -METHOD GOTO( nRecNo ) CLASS TODBC +METHOD Goto( nRecNo ) CLASS TODBC LOCAL nResult := ::Fetch( SQL_FETCH_ABSOLUTE, nRecNo ) IF nResult == SQL_SUCCESS - ::nRecno := nRecNo + ::nRecno := nRecNo ELSE - //TODO: Error handling + // TODO: Error handling ENDIF RETURN nResult @@ -661,7 +646,7 @@ METHOD GOTO( nRecNo ) CLASS TODBC /*-----------------------------------------------------------------------*/ // Skips dataset to the next record - wrapper to Next() -METHOD SKIP() CLASS TODBC +METHOD Skip() CLASS TODBC RETURN ::Next() @@ -669,7 +654,7 @@ METHOD SKIP() CLASS TODBC // Checks for End of File (End of DataSet, actually) // NOTE: Current implementation usable only with drivers that report number of records in last select -METHOD eof() CLASS TODBC +METHOD Eof() CLASS TODBC LOCAL lResult @@ -686,7 +671,7 @@ METHOD eof() CLASS TODBC /*-----------------------------------------------------------------------*/ // Checks for Begining of File -METHOD bof() CLASS TODBC +METHOD Bof() CLASS TODBC RETURN ::lBof @@ -761,12 +746,12 @@ METHOD LoadData( nPos ) CLASS TODBC CASE SQL_FLOAT CASE SQL_REAL - IF ISCHARACTER( uData ) - uData := StrTran( uData, ",", "." ) - uData := Round( Val( uData ), ::Fields[ i ]:DataSize ) - ENDIF - uData := SetNumLen( uData, ::Fields[ i ]:DataSize ,::Fields[ i ]:DataDecs ) - EXIT + IF ISCHARACTER( uData ) + uData := StrTran( uData, ",", "." ) + uData := Round( Val( uData ), ::Fields[ i ]:DataSize ) + ENDIF + uData := SetNumLen( uData, ::Fields[ i ]:DataSize, ::Fields[ i ]:DataDecs ) + EXIT ENDSWITCH diff --git a/harbour/tests/bnchmark/bnch_win.bat b/harbour/tests/bnchmark/bnch_win.bat new file mode 100644 index 0000000000..66374c86c3 --- /dev/null +++ b/harbour/tests/bnchmark/bnch_win.bat @@ -0,0 +1,115 @@ +@rem +@rem $Id$ +@rem + +@rem --------------------------------------------------------------- +@rem Benchmark for Harbour Project +@rem +@rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu) +@rem See doc/license.txt for licensing terms. +@rem +@rem This script requires: +@rem - Windows XP or upper +@rem - Harbour binary build +@rem - Harbour binary build \bin dir as current dir +@rem - This batch copied into current dir +@rem - speedtst.prg copied into current dir +@rem - envvars HB_CMP_FLAGS_[1-8] set to speedtst build flags +@rem - envvars HB_RUN_FLAGS_[1-8] set to speedtst run flags (optional) +@rem - envvar HB_RUN_FLAGS set to common speedtst run flags (optional) +@rem - envvar HB_BENCH_RUNS set to number of times tests are run (default: 3) +@rem - C compiler configured (just like you'd do for hbmk2) +@rem - Running it using this command: +@rem 'hbbm_win.bat > results.txt 2>&1' +@rem --------------------------------------------------------------- + +@if not "%OS%" == "Windows_NT" goto END + +@echo off + +echo.>_hbhwinfo.js +echo.var locator = WScript.CreateObject( "WbemScripting.SWbemLocator" );>>_hbhwinfo.js +echo.var services = locator.ConnectServer();>>_hbhwinfo.js +echo.var items = new Enumerator( services.ExecQuery( "SELECT * FROM Win32_Processor" ) );>>_hbhwinfo.js +echo.while( ! items.atEnd() )>>_hbhwinfo.js +echo.{>>_hbhwinfo.js +echo. var item = items.item();>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "Name: " + item.Name );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "Description: " + item.Description );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "Manufacturer: " + item.Manufacturer );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "NumberOfCores: " + item.NumberOfCores );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "NumberOfLogicalProcessors: " + item.NumberOfLogicalProcessors );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "AddressWidth: " + item.AddressWidth + " bits" );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "DataWidth: " + item.DataWidth + " bits" );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "CurrentClockSpeed: " + item.CurrentClockSpeed + " MHz" );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "MaxClockSpeed: " + item.MaxClockSpeed + " MHz" );>>_hbhwinfo.js +echo. WScript.StdOut.WriteLine( "ExtClock: " + item.ExtClock + " MHz" );>>_hbhwinfo.js +echo. items.moveNext();>>_hbhwinfo.js +echo.}>>_hbhwinfo.js +echo.var items = new Enumerator( services.ExecQuery( "SELECT * FROM Win32_PhysicalMemory" ) );>>_hbhwinfo.js +echo.var totalMemory = 0;>>_hbhwinfo.js +echo.while( ! items.atEnd() )>>_hbhwinfo.js +echo.{>>_hbhwinfo.js +echo. var item = items.item();>>_hbhwinfo.js +echo. totalMemory += parseInt( item.Capacity ) / 1024 / 1024;>>_hbhwinfo.js +echo. items.moveNext();>>_hbhwinfo.js +echo.}>>_hbhwinfo.js +echo.WScript.StdOut.WriteLine( "Physical memory: " + totalMemory + " MiB" );>>_hbhwinfo.js + +@echo on + +@rem ; Hardware information +cscript //nologo //E:javascript _hbhwinfo.js + +@del _hbhwinfo.js + +@rem ; Harbour information +harbour /build + +@rem ; Pre-make cleanup +if exist speedtst_*.exe del speedtst_*.exe + +@rem ; Default test flags +if "%HB_CMP_FLAGS_1%" == "" set HB_CMP_FLAGS_1=-st +if "%HB_CMP_FLAGS_2%" == "" set HB_CMP_FLAGS_2=-mt +if "%HB_BENCH_RUNS%" == "" set HB_BENCH_RUNS=3 + +@rem ; Creating speedtst executables +if not "%HB_CMP_FLAGS_1%" == "" hbmk2 speedtst.prg -q0 -trace -ospeedtst_1.exe %HB_CMP_FLAGS_1% +if not "%HB_CMP_FLAGS_2%" == "" hbmk2 speedtst.prg -q0 -trace -ospeedtst_2.exe %HB_CMP_FLAGS_2% +if not "%HB_CMP_FLAGS_3%" == "" hbmk2 speedtst.prg -q0 -trace -ospeedtst_3.exe %HB_CMP_FLAGS_3% +if not "%HB_CMP_FLAGS_4%" == "" hbmk2 speedtst.prg -q0 -trace -ospeedtst_4.exe %HB_CMP_FLAGS_4% +if not "%HB_CMP_FLAGS_5%" == "" hbmk2 speedtst.prg -q0 -trace -ospeedtst_5.exe %HB_CMP_FLAGS_5% +if not "%HB_CMP_FLAGS_6%" == "" hbmk2 speedtst.prg -q0 -trace -ospeedtst_6.exe %HB_CMP_FLAGS_6% +if not "%HB_CMP_FLAGS_7%" == "" hbmk2 speedtst.prg -q0 -trace -ospeedtst_7.exe %HB_CMP_FLAGS_7% +if not "%HB_CMP_FLAGS_8%" == "" hbmk2 speedtst.prg -q0 -trace -ospeedtst_8.exe %HB_CMP_FLAGS_8% + +@rem ; speedtst executable information +dir speedtst_*.exe speedtst.prg + +@rem ; pre-OS state information +tasklist + +@rem ; Running speedtst executables in multiple runs +@for /l %%r in (1,1,%HB_BENCH_RUNS%) do @call :RUN_ALL %%r + +@rem ; post-OS state information +tasklist + +@goto END + +:RUN_ALL + + @echo. + @echo Run #%1 + if exist speedtst_1.exe speedtst_1.exe %HB_RUN_FLAGS% %HB_RUN_FLAGS_1% + if exist speedtst_2.exe speedtst_2.exe %HB_RUN_FLAGS% %HB_RUN_FLAGS_2% + if exist speedtst_3.exe speedtst_3.exe %HB_RUN_FLAGS% %HB_RUN_FLAGS_3% + if exist speedtst_4.exe speedtst_4.exe %HB_RUN_FLAGS% %HB_RUN_FLAGS_4% + if exist speedtst_5.exe speedtst_5.exe %HB_RUN_FLAGS% %HB_RUN_FLAGS_5% + if exist speedtst_6.exe speedtst_6.exe %HB_RUN_FLAGS% %HB_RUN_FLAGS_6% + if exist speedtst_7.exe speedtst_7.exe %HB_RUN_FLAGS% %HB_RUN_FLAGS_7% + if exist speedtst_8.exe speedtst_8.exe %HB_RUN_FLAGS% %HB_RUN_FLAGS_8% + @goto END + +:END