Skip to content

Commit 59c1c1d

Browse files
committed
fix: apply suggestions and drop noise code
Signed-off-by: yihong0618 <[email protected]>
1 parent c2e66dd commit 59c1c1d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Lib/profiling/sampling/_sync_coordinator.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ def _execute_module(module_name: str, module_args: List[str]) -> None:
149149
pass
150150
except Exception as e:
151151
raise TargetError(f"Error executing module '{module_name}': {e}") from e
152-
finally:
153-
sys.stdout.flush()
154-
sys.stderr.flush()
155152

156153

157154
def _execute_script(script_path: str, script_args: List[str], cwd: str) -> None:
@@ -201,9 +198,6 @@ def _execute_script(script_path: str, script_args: List[str], cwd: str) -> None:
201198
pass
202199
except Exception as e:
203200
raise TargetError(f"Error executing script '{script_path}': {e}") from e
204-
finally:
205-
sys.stdout.flush()
206-
sys.stderr.flush()
207201

208202

209203
def main() -> NoReturn:

Lib/test/test_profiling/test_sampling_profiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3040,13 +3040,13 @@ def worker(x):
30403040
with SuppressCrashReport():
30413041
with script_helper.spawn_python(
30423042
"-m", "profiling.sampling.sample",
3043-
"-d", "1",
3043+
"-d", "5",
30443044
"-i", "100000",
30453045
script,
30463046
stderr=subprocess.PIPE,
30473047
text=True
30483048
) as proc:
3049-
proc.wait(timeout=10)
3049+
proc.wait(timeout=SHORT_TIMEOUT)
30503050
stdout = proc.stdout.read()
30513051
stderr = proc.stderr.read()
30523052

0 commit comments

Comments
 (0)