aboutsummaryrefslogtreecommitdiff
path: root/test/functional/README.md
AgeCommit message (Collapse)Author
2019-02-08qa: Add tool-prefix to functional test readmeMarcoFalke
2019-02-05Merge #14519: tests: add utility to easily profile node performance with perfMarcoFalke
13782b8ba8 docs: add perf section to developer docs (James O'Beirne) 58180b5fd4 tests: add utility to easily profile node performance with perf (James O'Beirne) Pull request description: Adds a context manager to easily (and selectively) profile node performance during functional test execution using `perf`. While writing some tests, I encountered some odd bitcoind slowness. I wrote up a utility (`TestNode.profile_with_perf`) that generates performance diagnostics for a node by running `perf` during the execution of a particular region of test code. `perf` usage is detailed in the excellent (and sadly unmerged) https://github.com/bitcoin/bitcoin/pull/12649; all due props to @eklitzke. ### Example ```python with node.profile_with_perf("large-msgs"): for i in range(200): node.p2p.send_message(some_large_msg) node.p2p.sync_with_ping() ``` This generates a perf data file in the test node's datadir (`/tmp/testtxmpod0y/node0/node-0-TestName-large-msgs.perf.data`). Running `perf report` generates nice output about where the node spent most of its time while running that part of the test: ```bash $ perf report -i /tmp/testtxmpod0y/node0/node-0-TestName-large-msgs.perf.data --stdio \ | c++filt \ | less # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 135 of event 'cycles:pp' # Event count (approx.): 1458205679493582 # # Children Self Command Shared Object Symbol # ........ ........ ............... ................... ........................................................................................................................................................................................................................................................................ # 70.14% 0.00% bitcoin-net bitcoind [.] CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) | ---CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) 70.14% 0.00% bitcoin-net bitcoind [.] CNetMessage::readData(char const*, unsigned int) | ---CNetMessage::readData(char const*, unsigned int) CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) 35.52% 0.00% bitcoin-net bitcoind [.] std::vector<char, zero_after_free_allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, zero_after_free_allocator<char> > >, unsigned long, char const&) | ---std::vector<char, zero_after_free_allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, zero_after_free_allocator<char> > >, unsigned long, char const&) CNetMessage::readData(char const*, unsigned int) CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) ... ``` Tree-SHA512: 9ac4ceaa88818d5eca00994e8e3c8ad42ae019550d6583972a0a4f7b0c4f61032e3d0c476b4ae58756bc5eb8f8015a19a7fc26c095bd588f31d49a37ed0c6b3e
2019-01-24Docs: Update python docs to reflect that wildcard imports are disallowedBen Woosley
2019-01-22tests: add utility to easily profile node performance with perfJames O'Beirne
Introduces `TestNode.profile_with_perf()` context manager which samples node execution to produce profiling data. Also introduces a test framework flag, `--perf`, which will run perf on all nodes for the duration of a given test.
2019-01-15[doc] explain what .python-version doesSjors Provoost
2018-09-26Document fixed attribute behavior in critical test framework classes.Justin Turner Arthur
Per @jimmysong's suggestion in bitcoin/bitcoin#14305. Also corrects module for network objects and wrappers.
2018-07-19docs: Specify preferred Python string formatting techniqueMason Simon
2018-06-25qa: Avoid start/stop of the network thread mid-testMarcoFalke
2018-05-24test: Move linters to test/lint, add readmeMarcoFalke
2018-04-02[tests] Remove Comparison Test FrameworkJohn Newbery
2018-01-25[tests] Rename p2p_* functional tests.Anthony Towns
2018-01-25[tests] Rename feature_* functional tests.Anthony Towns
2018-01-15Merge #11796: [tests] Functional test naming conventionWladimir J. van der Laan
5fecd84 [tests] Remove redundant import in blocktools.py test (Anthony Towns) 9b20bb4 [tests] Check tests conform to naming convention (Anthony Towns) 7250b4e [tests] README.md nit fixes (Anthony Towns) 82b2712 [tests] move witness util functions to blocktools.py (John Newbery) 1e10854 [tests] [docs] update README for new test naming scheme (John Newbery) Pull request description: Splitting #11774 into two parts -- this part updates the README with the proposed naming convention, and adds some checks to test_runner.py that the number of tests violating the naming convention doesn't increase too much. Idea is this part of the change should not introduce merge conflicts or require much rebasing, so reviews of the complicated bits won't become invalidated too often; while the second part will just be file renames, which will require regular rebasing and will introduce merge conflicts with pending PRs, but can be merged later, and should also be much easier to review, since it will only include relatively trivial changes. Tree-SHA512: b96557d41714addbbfe2aed62fb5a48639eaeb1eb3aba30ac1b3a86bb3cb8d796c6247f9c414c4695c4bf54c0ec9968ac88e2f88fb62483bc1a2f89368f7fc80
2018-01-04Fix incorrect Markdown linkpracticalswift
2017-12-11[tests] Use network_thread_start() in tests.John Newbery
2017-11-30[tests] README.md nit fixesAnthony Towns
2017-11-29[tests] Rename NodeConn and NodeConnCBJohn Newbery
NodeConn -> P2PConnection NodeConnCB -> P2PInterface
2017-10-10[tests] [docs] update README for new test naming schemeJohn Newbery
2017-09-01[tests] don't override __init__() in individual testsJohn Newbery
Almost all test scripts currently need to override the __init__() method. When they do that they need to call into super().__init__() as the base class does some generic initialization. This commit makes the base class __init__() call into set_test_params() method. Individual test cases can override set_test_params() to setup their test parameters.
2017-08-08Capitalize bullet points in CONTRIBUTING guideEvan Klitzke
English grammar dictates that these bullet points should be capitalized. This also makes the capitalization style consistent with the rest of the document, e.g. the "Decision Making Process" section.
2017-06-27[tests] Update functional tests documentationJohn Newbery
2017-04-13[tests] Remove maxblocksinflight testcaseJohn Newbery
maxblocksinflight tested that a node would not send get_data messages for more than 16 new blocks at the same time. bitcoin core no longer responds to block invs with get_data, since it does headers-first sync'ing. This test was therefore testing nothing and can be removed. the sendheaders test script tests that bitcoin will not send get_headers for more than 16 blocks simultaneously.
2017-03-20Rename rpc-tests directory to functionalJohn Newbery