Skip to content

Commit

Permalink
Merge pull request #945 from AntelopeIO/performance_harness_reduce_lo…
Browse files Browse the repository at this point in the history
…g_usage

[PH] Reduce log Usage and Other Performance Harness Improvements
  • Loading branch information
oschwaldp-oci authored Apr 4, 2023
2 parents 553b834 + cd87f42 commit d7eb6d7
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 345 deletions.
5 changes: 0 additions & 5 deletions tests/performance_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
configure_file(performance_test_basic.py . COPYONLY)
configure_file(performance_test.py . COPYONLY)
configure_file(log_reader.py . COPYONLY)
configure_file(log_reader_tests.py . COPYONLY)
configure_file(nodeos_log_2_0_14.txt.gz . COPYONLY)
configure_file(nodeos_log_3_2.txt.gz . COPYONLY)
configure_file(block_trx_data_log_2_0_14.txt.gz . COPYONLY)
configure_file(genesis.json . COPYONLY)
configure_file(cpuTrxData.json . COPYONLY)
configure_file(ramTrxData.json . COPYONLY)
Expand All @@ -24,7 +20,6 @@ add_test(NAME performance_test_basic_ex_transfer_trx_spec COMMAND tests/performa
add_test(NAME performance_test_basic_ex_new_acct_trx_spec COMMAND tests/performance_tests/performance_test_basic.py -v -p 1 -n 1 --target-tps 20 --tps-limit-per-generator 10 --test-duration-sec 5 --clean-run --chain-state-db-size-mb 200 --user-trx-data-file tests/performance_tests/userTrxDataNewAccount.json ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_test(NAME performance_test_basic_ex_cpu_trx_spec COMMAND tests/performance_tests/performance_test_basic.py -v -p 1 -n 1 --target-tps 20 --tps-limit-per-generator 10 --test-duration-sec 5 --clean-run --chain-state-db-size-mb 200 --account-name "c" --abi-file eosmechanics.abi --wasm-file eosmechanics.wasm --contract-dir unittests/contracts/eosio.mechanics --user-trx-data-file tests/performance_tests/cpuTrxData.json ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_test(NAME performance_test_basic_ex_ram_trx_spec COMMAND tests/performance_tests/performance_test_basic.py -v -p 1 -n 1 --target-tps 20 --tps-limit-per-generator 10 --test-duration-sec 5 --clean-run --chain-state-db-size-mb 200 --account-name "r" --abi-file eosmechanics.abi --wasm-file eosmechanics.wasm --contract-dir unittests/contracts/eosio.mechanics --user-trx-data-file tests/performance_tests/ramTrxData.json ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_test(NAME log_reader_tests COMMAND tests/performance_tests/log_reader_tests.py WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST performance_test PROPERTY LABELS long_running_tests)
set_property(TEST performance_test_ex_cpu_trx_spec PROPERTY LABELS long_running_tests)
set_property(TEST performance_test_basic PROPERTY LABELS nonparallelizable_tests)
Expand Down
Binary file not shown.
216 changes: 101 additions & 115 deletions tests/performance_tests/log_reader.py

Large diffs are not rendered by default.

206 changes: 0 additions & 206 deletions tests/performance_tests/log_reader_tests.py

This file was deleted.

Binary file removed tests/performance_tests/nodeos_log_2_0_14.txt.gz
Binary file not shown.
Binary file removed tests/performance_tests/nodeos_log_3_2.txt.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/performance_tests/performance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class PerfTestSearchResults:

@dataclass
class LoggingConfig:
logDirBase: Path = Path(".")/PurePath(PurePath(__file__).name).stem[0]
logDirBase: Path = Path(".")/PurePath(PurePath(__file__).name).stem
logDirTimestamp: str = f"{datetime.utcnow().strftime('%Y-%m-%d_%H-%M-%S')}"
logDirPath: Path = field(default_factory=Path, init=False)
ptbLogsDirPath: Path = field(default_factory=Path, init=False)
Expand All @@ -99,7 +99,7 @@ def __init__(self, testHelperConfig: PerformanceTestBasic.TestHelperConfig=Perfo

self.testsStart = datetime.utcnow()

self.loggingConfig = PerformanceTest.LoggingConfig(logDirBase=Path(self.ptConfig.logDirRoot)/PurePath(PurePath(__file__).name).stem[0],
self.loggingConfig = PerformanceTest.LoggingConfig(logDirBase=Path(self.ptConfig.logDirRoot)/PurePath(PurePath(__file__).name).stem,
logDirTimestamp=f"{self.testsStart.strftime('%Y-%m-%d_%H-%M-%S')}")

def performPtbBinarySearch(self, clusterConfig: PerformanceTestBasic.ClusterConfig, logDirRoot: Path, delReport: bool, quiet: bool, delPerfLogs: bool) -> TpsTestResult.PerfTestSearchResults:
Expand Down
Loading

0 comments on commit d7eb6d7

Please sign in to comment.