phpbenchmarks/benchmark-kit
Composer 安装命令:
composer require phpbenchmarks/benchmark-kit
包简介
PHPBenchmarks kit to add benchmarks on phpbenchmarks.com
README 文档
README
Benchmark kit is a tool to add a framework or a template engine benchmark on phpbenchmarks.com.
Documentation
Requirements
You will need Docker ^18.06 to make it work.
Installation
Everything you need to use benchmark kit is is phpbenchkit.sh.
Install it as global bin and give it execute mode:
sudo wget https://raw.githubusercontent.com/phpbenchmarks/benchmark-kit/master/phpbenchkit.sh -O /usr/local/bin/phpbenchkit sudo chmod +x /usr/local/bin/phpbenchkit
Then call phpbenchkit, it will add vhosts and run Docker benchmatk kit container:
# Add vhosts if needed, run Docker container and call bin/console to show available commands phpbenchkit # Restart Docker container phpbenchkit --restart # Stop Docker container phpbenchkit --stop # Update docker image and phpbenchkit command phpbenchkit --selfupdate
Benchmark kit commands
List available commands:
phpbenchkit
Almost all commands accept this option:
--skip-source-code-urls: don't validate source code urls, usefull while you are in development.
#1 Ask us to create repositories
You can ask us to create repositories with contact form.
Tell us which component and version you want to benchmark,
and your github username to allow you to commit on this repositories.
We will send you an email when repositories will be created.
#2 Initialize code
To make your benchmark work you will need some files into .phpbenchmarks directory:
Configuration.php: configuration of benchmarked component.initBenchmark.sh: called before the benchmark to initialize everything (composer install, cache warmup etc).vhost.conf: nginx virtual host configuration.responseBody/: benchmark url body will be compared to files in this directory to validate it's content.composer/composer.lock.phpX.Y: created byphpbenchkit composer:updateto install dependencies by PHP version.
All this files can be created and configured with configure commands.
See list of configure commands with phpbenchkit configure:.
You can call phpbenchkit configure:benchmark to create all of them or use the one your need.
phpbenchkit composer:update
# you can specify a version of php
phpbenchkit composer:update 7.1
You can validate each part of your configuration with validate.
See list of validation commands with with phpbenchkit validate:.
#4 Add required feaures for benchmarks
Choose the component type and benchmark type you want to code:
- Framework
- Template engine
Note that all component benchmarks needs to bo validated to make your component appear on phpbenchmarks.com.
#5 Test and validate your code
Docker container provide a domain to test your code: http://benchmark-kit.loc.
To change PHP version (CLI and FPM):
phpbenchkit
When you think it's ok, use phpbenchkit validate:benchmark to validate it.
#6 Submit your code
When phpbenchkit validate:benchmark say it's good, push your code,
then you can tell us to launch benchmarks with contact form.
Thank you!
phpbenchmarks/benchmark-kit 适用场景与选型建议
phpbenchmarks/benchmark-kit 是一款 基于 Twig 开发的 Composer 扩展包,目前已累计 87 次下载、GitHub Stars 达 30, 最近一次更新时间为 2019 年 01 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 phpbenchmarks/benchmark-kit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 phpbenchmarks/benchmark-kit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 87
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 30
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2019-01-23