diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2023-04-24 07:38:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-24 07:38:45 -0400 |
| commit | ea4163ce49b82b4eadb4b78af95a741d132cbcc0 (patch) | |
| tree | 5485c6c9c3c9467a45dc170c5953f33fb823e0a4 /tests/topotests/conftest.py | |
| parent | 766fcb6056dcdb9e520f6eb2bfb0393b82b20e98 (diff) | |
| parent | a3e8e1aacb2785b30132bccdf99e2fbf032ec6c1 (diff) | |
Merge pull request #13365 from LabNConsulting/chopps/add-perf-option
Add ability to profile daemons in topotest with --perf
Diffstat (limited to 'tests/topotests/conftest.py')
| -rwxr-xr-x | tests/topotests/conftest.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/topotests/conftest.py b/tests/topotests/conftest.py index 31d796ccb8..ce59554b1a 100755 --- a/tests/topotests/conftest.py +++ b/tests/topotests/conftest.py @@ -80,8 +80,8 @@ def pytest_addoption(parser): action="append", metavar="DAEMON[,ROUTER[,...]", help=( - "Tail-F of DAEMON log file. Specify routers in comma-separated list after " - "daemon to limit to a subset of routers" + "Tail-F the DAEMON log file on all or a subset of ROUTERs." + " Option can be given multiple times." ), ) @@ -117,6 +117,23 @@ def pytest_addoption(parser): help="Comma-separated list of networks to capture packets on, or 'all'", ) + parser.addoption( + "--perf", + action="append", + metavar="DAEMON[,ROUTER[,...]", + help=( + "Collect performance data from given DAEMON on all or a subset of ROUTERs." + " Option can be given multiple times." + ), + ) + + parser.addoption( + "--perf-options", + metavar="OPTS", + default="-g", + help="Options to pass to `perf record`.", + ) + rundir_help = "directory for running in and log files" parser.addini("rundir", rundir_help, default="/tmp/topotests") parser.addoption("--rundir", metavar="DIR", help=rundir_help) |
