craft-plugins/benchmark 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

craft-plugins/benchmark

最新稳定版本:1.1.0

Composer 安装命令:

composer require craft-plugins/benchmark

包简介

Simple benchmark plugin with basic benchmark functionality for Craft CMS.

README 文档

README

License MIT GitHub Repo stars GitHub forks Hits of Code

Simple benchmark plugin with basic functionality for benchmarking.

Requirements

  • Craft CMS: ^4.0
  • PHP: ^8.0

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

    cd /path/to/project
    
  2. In your terminal run composer require awilum/craft-benchmark.

  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Benchmark.

Usage

{% do benchmarkStart('fetch_news') %}
    {% set entryQuery = craft.entries()
    .section('news')
    .orderBy('postDate DESC')
    .limit(10) %}
{% do benchmarkEnd('fetch_news') %}


Time elapsed: {{ benchmarkSummary()['fetch_news']['time']['elapsed_formated'] }}
Memory usage: {{ benchmarkSummary()['fetch_news']['memory']['usage_formated'] }}

//=> Time elapsed: 1ms
//=> Memory usage: 3.46KB

Functions

PHP function Twig function Description
Awilum\CraftBenchmark\benchmarkStart benchmarkStart Start benchmark prob.
Awilum\CraftBenchmark\benchmarkEnd benchmarkEnd End benchmark prob.
Awilum\CraftBenchmark\benchmarkDelete benchmarkDelete Delete benchmark prob.
Awilum\CraftBenchmark\benchmarkFlush benchmarkFlush Flush benchmark prob.
Awilum\CraftBenchmark\benchmarkSummary benchmarkSummary Get benchmark summary.

Tests

Run tests

./vendor/bin/pest

LICENSE

The MIT License (MIT) Copyright (c) Sergey Romanenko

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固