From 82e214634c45109c94b4fab813566d128c2ed88d Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Oct 2023 11:54:00 -0500 Subject: [PATCH] GH-1690 Need to wait over time of run, so offset from startBlock. Make --print-missing-transactions=True the default as it is useful when there are missing trxs. --- tests/PerformanceHarness/log_reader.py | 2 +- tests/PerformanceHarness/performance_test_basic.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/PerformanceHarness/log_reader.py b/tests/PerformanceHarness/log_reader.py index ef68d4b4d5..388596c4b0 100644 --- a/tests/PerformanceHarness/log_reader.py +++ b/tests/PerformanceHarness/log_reader.py @@ -39,7 +39,7 @@ class TpsTestConfig: numTrxGensUsed: int = 0 targetTpsPerGenList: List[int] = field(default_factory=list) quiet: bool = False - printMissingTransactions: bool=False + printMissingTransactions: bool=True @dataclass class stats(): diff --git a/tests/PerformanceHarness/performance_test_basic.py b/tests/PerformanceHarness/performance_test_basic.py index 0d56329985..47d01bb242 100755 --- a/tests/PerformanceHarness/performance_test_basic.py +++ b/tests/PerformanceHarness/performance_test_basic.py @@ -171,7 +171,7 @@ class PtbConfig: quiet: bool=False delPerfLogs: bool=False expectedTransactionsSent: int = field(default_factory=int, init=False) - printMissingTransactions: bool=False + printMissingTransactions: bool=True userTrxDataFile: Path=None endpointMode: str="p2p" apiEndpoint: str=None @@ -495,7 +495,7 @@ def configureConnections(): scrapeTrxGenTrxSentDataLogs(trxSent, self.trxGenLogDirPath, self.ptbConfig.quiet) if len(trxSent) != self.ptbConfig.expectedTransactionsSent: print(f"ERROR: Transactions generated: {len(trxSent)} does not match the expected number of transactions: {self.ptbConfig.expectedTransactionsSent}") - blocksToWait = 2 * self.ptbConfig.testTrxGenDurationSec + 10 + blocksToWait = self.data.startBlock + (2 * self.ptbConfig.testTrxGenDurationSec) + 10 trxNotFound = self.validationNode.waitForTransactionsInBlockRange(trxSent, self.data.startBlock, blocksToWait) self.data.ceaseBlock = self.validationNode.getHeadBlockNum() @@ -733,7 +733,7 @@ def _createBaseArgumentParser(defEndpointApiDef: str, defProdNodeCnt: int, defVa ptbBaseParserGroup.add_argument("--save-state", help=argparse.SUPPRESS if suppressHelp else "Whether to save node state. (Warning: large disk usage)", action='store_true') ptbBaseParserGroup.add_argument("--quiet", help=argparse.SUPPRESS if suppressHelp else "Whether to quiet printing intermediate results and reports to stdout", action='store_true') ptbBaseParserGroup.add_argument("--prods-enable-trace-api", help=argparse.SUPPRESS if suppressHelp else "Determines whether producer nodes should have eosio::trace_api_plugin enabled", action='store_true') - ptbBaseParserGroup.add_argument("--print-missing-transactions", help=argparse.SUPPRESS if suppressHelp else "Toggles if missing transactions are be printed upon test completion.", action='store_true') + ptbBaseParserGroup.add_argument("--print-missing-transactions", type=bool, help=argparse.SUPPRESS if suppressHelp else "Toggles if missing transactions are be printed upon test completion.", default=True) ptbBaseParserGroup.add_argument("--account-name", type=str, help=argparse.SUPPRESS if suppressHelp else "Name of the account to create and assign a contract to", default="eosio") ptbBaseParserGroup.add_argument("--contract-dir", type=str, help=argparse.SUPPRESS if suppressHelp else "Path to contract dir", default="unittests/contracts/eosio.system") ptbBaseParserGroup.add_argument("--wasm-file", type=str, help=argparse.SUPPRESS if suppressHelp else "WASM file name for contract", default="eosio.system.wasm")