Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Measure CPU time instead of wallclock time

オープン
#157 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
testing-qa

調査の方向性

まず、threading.Timer ベースの pytest-timeout のタイムアウト処理を追跡し、経過時間がどこで測定されているかを特定します。プロセスの一時停止中の時間計測の挙動を、要求された CPU 時間または実際の実行時間と比較し、そのうえで、一時停止された CI の処理がすぐに期限切れにならず、実際のテスト実行では引き続きタイムアウトすることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Currently pytest-timeout uses threading.Timer to measure time. This measures wallclock time, so if the process is paused for 10 minutes and is unpaused later, timeout will immediately expire even if the process did not have a chance to actually do any work. This happens in GitHub Actions CI, which sometimes unschedules processes for a long time as I have observed for Rust testsuite running under nextest: reported time of some tests which normally take less than one second was randomly several minutes. It is ok if CI suspends the workflow, but pytest-timeout should detect this and measure actual time the test was running rather than wallclock time.

主要言語
Python
スター
258
フォーク
69
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pytest-dev/pytest-timeout のほかの issue

pytest-dev/pytest-timeout の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。