FramePacer class
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- game-dev, performance
調査の方向性
実装ファイル、テスト、エントリーポイントのいずれも指定されていません。まず engine のプロセスおよびタイミングのコードを特定し、その後、目標が frame pacing、checkpoint の統計情報、またはシステムレベルの原因の診断のいずれであるかを明確にしてから、完了の定義を決めてください。
索引モデルが issue の本文から書いたものです。
説明
Can use in any process, not just the core engine processes.
class FramePacer {
vector<string> checkpoint_names;
vector<CheckpointStats> checkpoint_stats;
Stat<float> metric_too_expensive_to_retrieve_every_checkpoint?;//maybe temperatures?
//Any of these function calls might sleep or busy wait if you're ahead of schedule if the frame pacing control is enabled
void StartFrame(float wait_multiplier, float target_frame_time);//doesn't have to be a frame, just the largest unit of work
void EndFrame(float wait_multiplier);
void StartCheckpoint(int id, float wait_multiplier);
void EndCheckpoint(int id, float wait_multiplier);
//wait_multiplier multiplies the amount of time to wait to maintain frame pacing, 0 of course means never wait. A value greater than 1.0 would rarely be useful unless you know that a certain frame is going to be too fast for some reason? If you know the frame is going to be too fast before you take input then wouldn't you just do a sleep for a set amount of time outside of this function?
//Or maybe I just need a Split function that works like live split and automatically keeps track of what checkpoint you're on? Or maybe keep the explicit StartFrame and EndFrame but inside of that just use a split function?
//Maybe I should provide a sleep function in this class so it can intelligently track it and determine if it should busy wait or sleep?
void Sleep(float ms);
};
template<class T>//or maybe just always float?
class Stat {
T avg;
T lowest;
T highest;
T one_percent_low;
T one_percent_high;
};
class CheckpointStats {
Stat<float> time_ms;
Stat<int> cache_misses;
Stat<int> cache_hits;
Stat<float> cache_hit_rate;
Stat<int> instructions_executed;
Stat<int> cycles_executed;
Stat<int> branches;
Stat<float> gpu_load;
//Temperatures? Clock speeds? Some stats might be too expensive to retrieve every checkpoint?
};
Could I try to determine the cause of a hiccup? If it was GPU time, or which thread didn't get enough CPU time, if there were more cache misses than the average frame, maybe CPU clock speed changed, maybe something else on the system was using the CPU
Maybe with BTS I could count how many instructions were executed to see if a frame executed more instructions than average, or if more jumps were executed than average? It sounds like enabling it slows things down a lot though. https://stackoverflow.com/a/4531402
The FramePacer class could also determine how long certain checkpoints took to run for the frame. It might also be able to track all those other metrics per checkpoint. Imagine it telling you which part of the frame caused the extra cache misses that caused the stutter.
Maybe target_frame_time should be a member instead of function argument? Checkpoints could return how ahead/behind schedule they are/were? But if it sleeps when ahead, how will the program adapt to being ahead of schedule?
- 主要言語
- C++
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Die4Ever/AsyncGameEngine のほかの issue
-
Better frameworkオープン
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
Die4Ever/AsyncGameEngine#18 · コメント 2 件 ·
-
Green threadsオープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
Die4Ever/AsyncGameEngine#15 ·
-
Proxiesオープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
Die4Ever/AsyncGameEngine#14 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Die4Ever/AsyncGameEngine#13 ·
-
hub processオープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
Die4Ever/AsyncGameEngine#11 ·
Die4Ever/AsyncGameEngine の issue をすべて見る
似ている issue
-
Remove source files from packaging for deb, zip, etc対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
OpenSpace/OpenSpace#4353 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
justcallmekoko/ESP32Marauder#1656 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Decompiler: convertCharRef() in xml.y overflows its int4 accumulator on long character references対応中かも @kaayzouee が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NationalSecurityAgency/ghidra#10009 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mutationpp/Mutationpp#337 ·