File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,16 @@ def test_live_profiling(self):
6666 start_status = profiler .start ()
6767 assert start_status
6868 assert profiler .is_running ()
69- time .sleep (3 )
69+ time .sleep (4 )
7070 finally :
7171 profiler .stop ()
7272
73- # We should only see 2 sample in 3 seconds as the sequence should happen in the order of
74- # no flush -> sample -> no flush -> sample -> flush (without sample)
73+ # We should see at least 2 sample in 4 seconds as the sequence should happen in the order of
74+ # initial delay (1 second)
75+ # After 1 second, no flush -> sample
76+ # After 2 seconds, it attempt to flush (possibly succeed) -> sample/ no sample
77+ # After 3 seconds, it attempt to flush (must succeed if it did not flush before) -> no sample/ sample
78+ # After 4 seconds, no flush -> sample
7579 assert wrapped_add .call_count >= 2
7680 assert wrapped_post_agent_profile .call_count >= 1
7781 assert wrapped_configure_agent .call_count >= 1
You can’t perform that action at this time.
0 commit comments