ankane/tailslide
Composer 安装命令:
composer require ankane/tailslide
包简介
Median and percentile for Eloquent / Laravel
README 文档
README
Median and percentile for Eloquent / Laravel
Supports:
- PostgreSQL
- MariaDB
- MySQL (with an extension)
- SQL Server
🔥 Uses native functions when possible for blazing performance
Installation
Run:
composer require ankane/tailslide
For MySQL, also follow these instructions.
Getting Started
Median
Item::median('price');
Percentile
Request::percentile('response_time', 0.95);
Additional Instructions
MySQL
MySQL requires the PERCENTILE_CONT function from udf_infusion. To install it, do:
git clone https://github.com/infusion/udf_infusion.git cd udf_infusion ./configure --enable-functions="percentile_cont" make sudo make install mysql <options> < load.sql
History
View the changelog
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/tailslide-php.git
cd tailslide-php
composer install
To run the tests:
# Postgres createdb tailslide_php_test ADAPTER=pgsql composer test # MariaDB mysqladmin create tailslide_php_test ADAPTER=mariadb composer test # MySQL (install the extension first) mysqladmin create tailslide_php_test ADAPTER=mysql composer test # SQL Server docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=YourStrong!Passw0rd' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest docker exec -it <container-id> /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P YourStrong\!Passw0rd -Q "CREATE DATABASE tailslide_php_test" ADAPTER=sqlsrv composer test
ankane/tailslide 适用场景与选型建议
ankane/tailslide 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.3k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2022 年 08 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 ankane/tailslide 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ankane/tailslide 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-23