diff options
author | Pierrick Hymbert <pierrick.hymbert@gmail.com> | 2024-03-27 20:26:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-27 20:26:49 +0100 |
commit | a016026a3ac16d8c9b993a3573f19b9556d67de4 (patch) | |
tree | eb72bc0e48589c195d4523dd61511eb8f69c0dcc /examples/server/tests/features | |
parent | 53c7ec53d5eca26b2c0c648605543a5fa6c12817 (diff) |
server: continuous performance monitoring and PR comment (#6283)
* server: bench: init
* server: bench: reduce list of GPU nodes
* server: bench: fix graph, fix output artifact
* ci: bench: add mermaid in case of image cannot be uploaded
* ci: bench: more resilient, more metrics
* ci: bench: trigger build
* ci: bench: fix duration
* ci: bench: fix typo
* ci: bench: fix mermaid values, markdown generated
* typo on the step name
Co-authored-by: Xuan Son Nguyen <thichthat@gmail.com>
* ci: bench: trailing spaces
* ci: bench: move images in a details section
* ci: bench: reduce bullet point size
---------
Co-authored-by: Xuan Son Nguyen <thichthat@gmail.com>
Diffstat (limited to 'examples/server/tests/features')
-rw-r--r-- | examples/server/tests/features/steps/steps.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/server/tests/features/steps/steps.py b/examples/server/tests/features/steps/steps.py index 86c3339d..9a6cf7d6 100644 --- a/examples/server/tests/features/steps/steps.py +++ b/examples/server/tests/features/steps/steps.py @@ -1114,7 +1114,10 @@ def start_server_background(context): server_args.append('--verbose') if 'SERVER_LOG_FORMAT_JSON' not in os.environ: server_args.extend(['--log-format', "text"]) - print(f"starting server with: {context.server_path} {server_args}") + + args = [str(arg) for arg in [context.server_path, *server_args]] + print(f"bench: starting server with: {' '.join(args)}") + flags = 0 if 'nt' == os.name: flags |= subprocess.DETACHED_PROCESS @@ -1130,16 +1133,14 @@ def start_server_background(context): [str(arg) for arg in [context.server_path, *server_args]], **pkwargs) - def log_stdout(process): - for line in iter(process.stdout.readline, b''): - print(line.decode('utf-8'), end='') - thread_stdout = threading.Thread(target=log_stdout, args=(context.server_process,)) + def server_log(in_stream, out_stream): + for line in iter(in_stream.readline, b''): + print(line.decode('utf-8'), end='', file=out_stream) + + thread_stdout = threading.Thread(target=server_log, args=(context.server_process.stdout, sys.stdout)) thread_stdout.start() - def log_stderr(process): - for line in iter(process.stderr.readline, b''): - print(line.decode('utf-8'), end='', file=sys.stderr) - thread_stderr = threading.Thread(target=log_stderr, args=(context.server_process,)) + thread_stderr = threading.Thread(target=server_log, args=(context.server_process.stderr, sys.stderr)) thread_stderr.start() print(f"server pid={context.server_process.pid}, behave pid={os.getpid()}") |