Coder Social home page Coder Social logo

phpbenchmarks / benchmark-kit Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 4.0 803 KB

phpbenchmarks.com kit to add your benchmark.

Home Page: http://www.phpbenchmarks.com

Shell 0.01% Dockerfile 0.01% PHP 0.14% HTML 0.01% CSS 0.01% Twig 99.85%
benchmark php

benchmark-kit's People

Contributors

dependabot[bot] avatar ruudboon avatar steevanb avatar t-richard avatar tantrisse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

benchmark-kit's Issues

GitHub Action benchmarking?

Hello phpbenchmarks! I'm hailing from CodeIgniter 4. Frequently we will have PRs come up (like this and this) that the code will all seem fine but there are larger questions of performance. That got me thinking how I would evaluate a PR to answer the question: "Will this change significantly impact the framework's performance?"

My solution: a GitHub Action that returns a relative benchmark result similar to Code Coverage that could be assessed for "pass" or "failure". I've poked around at benchmarking and found you all, ready to go with your benchmark kit.

My question: Has anyone tried wrapping this kit in a GitHub Action? Would you be willing to work with us on launching a CodeIgniter 4 kit?

[4.0] Error on command "nginx:vhost:statistics:create"

Hello !

When using the command phpbenchmark nginx:vhost:statistics:create X.X an error is thrown because the script try to right the template for statistics in the /var/benchmark-kit/public directory of the container.
This folder is owned by root:root with default file permission so the current user (phpbenchmarks) can't write the file.

Why when building the container, don't you give ownership of the public folder to "phpbenchmarks" (as you do for the entrypoint file) ?

Or you could set this public folder as chmod 777 like nginx and the var folder.
As you commented in the dockerfile, there is no security concern in this app so lot's of solution here ^^

I can do a PR with your preferred solution if you want / need !

Fix export:benchmark:statistics

This command call BenchmarkValidateStatisticsCommand then save last statistics: in other word, only PHP 7.4 statistics are saved.

For PHP benchmarks, it's not a problem because there is only the current benchmarked PHP version configured.

But for all other components, PHP 7.4 statistics will be saved for all PHP versions.

ValidateBenchmarkStastisticsCommand is the only one to extends AbstractValidateBenchmarkCommand, remove this abstract class.

Try to restart PHP 7.4 5 times instead of 1

As PHP 7.4 preload can sometimes cause PHP-FPM to fail when restart, and sometimes not fail : try to restart it 5 times before stopping the execution.

Add path to preload.php in error message.

Fix export:benchmark:configuration component.type.id

This data comes from Benchmark::getBenchmarkType() but that's not the right one.

We should remove id and use slug.

Take care to public static function getSourceCodeUrlIds(string $type = null, int $componentType = null): array: componentType will be a slug.

Try to retrieve statistics 5 times instead of 1

As PHP 7.4 preload can sometimes cause PHP-FPM to fail when restart, and sometimes not fail : try to retrieve statistics 5 times instead of 1, with a restart of PHP FPM each time.

get_declared_classes() and get_declared_traits() could cause a 502, and restart PHP-FPM without doing anything else can randomly solve the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.