Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpKernel] reset kernel start time on reboot#27344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@kiler129
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#27319
LicenseMIT
Doc PRn/a

I created branch from 3.4, since the furthest thing I could find for the reboot feature wasa4fc492 and it originated during stabilization phase of 3.4.

ping@nicolas-grekas

if (true ===$this->booted) {
if ($this->debug) {
$this->startTime =microtime(true);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I would remove the initialization done currently in__clone() as this is now redundant with this one.

Also, to be consistent, what about removing the same code in__construct() and always execute the initialization when theboot() method is called?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

As a side note, there is a side effect of this change (but this was already the case as of 3.4). Before 3.4, callingboot() a second time was a no-op. As of 3.4, callingboot() a second time re-initialize the Kernel.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@fabpot I fully agree with the first part about removing it from__clone().

My only concern is removing the time generation from__construct() and moving it totally toboot(). In standard installation I would say it's extremely unlikely that someone used the time beforeboot(), but should we care about possible edge-case here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

No, I would say that it does not matter (that is internal stuff anyway). And that gives more consistent numbers between the first request and the following ones.

kiler129 reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@fabpot Fixed.

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneMay 23, 2018
@nicolas-grekasnicolas-grekas changed the title[HttpKernel] fix bug #27319 reset kernel start time on reboot[HttpKernel] fix reset kernel start time on rebootMay 25, 2018
@nicolas-grekasnicolas-grekas changed the title[HttpKernel] fix reset kernel start time on reboot[HttpKernel] reset kernel start time on rebootMay 25, 2018
@nicolas-grekasnicolas-grekasforce-pushed thebug-27319-kernel-start-time-reset-on-reboot branch from00cae3b tob7feef0CompareMay 25, 2018 14:43
@nicolas-grekas
Copy link
Member

Thank you@kiler129.

@nicolas-grekasnicolas-grekas merged commitb7feef0 intosymfony:3.4May 25, 2018
nicolas-grekas added a commit that referenced this pull requestMay 25, 2018
This PR was squashed before being merged into the 3.4 branch (closes#27344).Discussion----------[HttpKernel] reset kernel start time on reboot| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#27319| License       | MIT| Doc PR        | n/aI created branch from 3.4, since the furthest thing I could find for the reboot feature wasa4fc492 and it originated during stabilization phase of 3.4.ping@nicolas-grekasCommits-------b7feef0 [HttpKernel] reset kernel start time on reboot
publicfunctionboot()
{
if ($this->debug) {
$this->startTime =microtime(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

shouldn't we do this only when we actually do something (i.e. when not booted, or when the booting again without a request stack size) ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

done in9de5014

kiler129 reacted with thumbs up emoji
@fabpotfabpot mentioned this pull requestMay 26, 2018
This was referencedJun 25, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@stofstofstof left review comments

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@kiler129@nicolas-grekas@fabpot@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp