Skip to content

Commit

Permalink
GH-1690 Need to wait over time of run, so offset from startBlock. Mak…
Browse files Browse the repository at this point in the history
…e --print-missing-transactions=True the default as it is useful when there are missing trxs.
  • Loading branch information
heifner committed Oct 24, 2023
1 parent db98dbc commit 82e2146
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/PerformanceHarness/log_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
6 changes: 3 additions & 3 deletions tests/PerformanceHarness/performance_test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 82e2146

Please sign in to comment.