Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OPCache reporter #12

Merged
merged 2 commits into from Apr 11, 2019
Merged

Add OPCache reporter #12

merged 2 commits into from Apr 11, 2019

Conversation

dz0ny
Copy link
Contributor

@dz0ny dz0ny commented Apr 11, 2019

Export Opcache stats to logger.

ref: https://github.com/niteoweb/woocart/issues/738

Export Opcache stats to the logger.
@dz0ny dz0ny changed the title Add OPCache reeporter Add OPCache reporter Apr 11, 2019
continue;
}
// left trim so it becomes `plugin-slug/{index.php, ...}`
$plugin_base = substr( $script, $plugins_base_length, $plugins_base_length );
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$plugin_base = substr( $script, $plugins_base_length, $plugins_base_length );
$plugin_base = substr( "wp-content/plugins/super-long-plugin-name-123456789/...", 19, 19 );
// "super-long-plugin-na"

I'm wondering if this can happen because you use $plugins_base_length as substring length

Copy link
Contributor Author

@dz0ny dz0ny Apr 11, 2019

Choose a reason for hiding this comment

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

Ah no, because both WP_PLUGINS_PATH (and the reason for wp_normalize) and opcache have absolute paths. If one, for example, uses chroot, then both paths would be again based on the same folder structure.

@dz0ny dz0ny merged commit 3bf612e into master Apr 11, 2019
@github-actions github-actions bot deleted the add/opcache-stats branch April 11, 2019 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants