Improve quality of event performance tracking
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- php
調査の方向性
まず、issue で説明されているイベントデータコレクターと October core の wildcard-listener 実装を見つけます。リスナーの優先度がどのように並べられているかを確認し、次に、測定がイベント実行全体にわたっていることと、収集したタイミングデータが各イベントについて記録されていることを検証します。
索引モデルが issue の本文から書いたものです。
説明
Remake of https://github.com/rainlab/debugbar-plugin/issues/42 by @LukeTowers.
Right now performance / timing tracking on events uses the difference between when the last event was fired to when the current event was fired to say how long a given event took to process. This is obviously wildly inaccurate and unhelpful, so it would be better if we could instead implement our own event data collector that actually tracked how long a given event was taking to execute by hooking one wildcard listener as the highest priority listener (with PHP_INT_MAX) and another wildcard listener as the lowest priority listener (with PHP_INT_MIN) and then recording the timing difference between those two listeners being fired.
This would require a change being made to the October core as currently wildcard listeners don't support subscribing to events with priority, and even if they did you'd still have to ensure that they were added to the priority stream of the non-wildcard listeners correctly.
Something roughly like the following:
$events->listen('*', [$this, 'onWildcardEventStart'], PHP_INT_MAX);
$events->listen('*', [$this, 'onWildcardEventEnd'], PHP_INT_MIN);
}
protected $timings = [];
public function onWildCardEventStart($name = null, $data = [])
{
if (empty($name)) { return; }
$this->timings[$name] = microtime(true);
}
public function onWildCardEventEnd($name = null, $data = [])
{
if (empty($name)) { return; }
$this->addMeasure($name, $this->timings[$name], microtime(true), $this->prepareParams($data));
}
- 主要言語
- PHP
- スター
- 12
- フォーク
- 9
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wintercms/wn-debugbar-plugin のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
wintercms/wn-debugbar-plugin#26 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
wintercms/wn-debugbar-plugin#25 · コメント 2 件 ·
-
Add ability to click on Twig paths to open editor with that file selected再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
wintercms/wn-debugbar-plugin#15 · コメント 4 件 ·
wintercms/wn-debugbar-plugin の issue をすべて見る
似ている issue
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 4 日以内に返信
-
Combination form: image thumbnails collapse to 0×0 when a stylesheet sets `img { max-width: 100% }`オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
PrestaShop/PrestaShop#43200 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Enhancement Help Wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
codeigniter4/CodeIgniter4#10616 ·
メンテナーはふだん 1 日以内に返信