-
Notifications
You must be signed in to change notification settings - Fork 6
issue 29: If the execution is < 1ms then global > 100 % #30
Conversation
$runningMarks = []; | ||
|
||
foreach ($this as $mark) { | ||
if ($mark->isRunning()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (true === $mark->isRunning())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmh, and false === $mark->isPause()
I didn't realized oneBis is running again, but it's manually paused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The result with the Pause test is:
Ggestleplusbeau
__global__ |||||||||||||||||||||||||||||||||||||||||||||||||||| 1ms, 100.0%
one |||| 0ms, 7.8%
oneBis |||| 0ms, 7.4%
two | 0ms, 2.1%
three | 0ms, 2.4%
Match the new values of oneBis with the previous ones.
👍 for me after the small modifications. |
Need to fix #30 (comment) before merging. |
$runningMarks = []; | ||
|
||
foreach ($this as $mark) { | ||
if (true === $mark->isRunning() && false === $mark->isPause()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe isRunning
should return false
if isPause
returns true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree with you.
isRunning()
is related to ->_isRunning
and isPause()
to ->_isPause
.
This condition should be in a other method.
I purpose 2 choices:
1-
- rename /isRunning/ to
isInitialized
- add
isRunning()
for initilized unpaused mark.
2-
- add
isTiming()
The second point is lighter ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference between isTiming
and isRunning
is not clear. isStarted
would be a nicer name for isRunning
… Any way… let's go for your patch and please open a new issue to address this problem.
Also, can you open two issues, please? One to update the English documentation and another for the French documentation. |
@1e1 You make good contributions and I really appreciate them. However, I reword your commit message by this one aeb9a65:
It much more respects the contributor guide requirement. We explain the issue and how we address this issue. Also the commit title much more reflect what the commit does. Just after, I created a new commit to make Finally, I reordered the methods in the class (a small detail): 46d656a. Thank you very much! |
fix #29
Moreover, test pause/resume abilities