Compare commits

...
Author SHA1 Message Date
poli0981 ddc7517492 Merge commit 'b693207387bdf4ee6a9fea5020e75dc14857efd7' into beta48/pr3-sampling-period
# Conflicts:
#	LIMITATIONS.md
2026-11-14 10:41:39 +07:00
poli0981andClaude Fable 5.2 b693207387 feat(advanced): two lines for the graphics card's own time, an honest GPU render label, every multiplier seen; Privacy Policy 2.21, Disclaimer 2.17 (D142-D145) (#451)
* feat(overlay): two more members of NVIDIA's latency report - the driver's active GPU time and its GPU frame time - and every frame-generation multiplier a session saw; four reserved words, layout still 5; a read left by the session before is dropped (D142, D144; in no release yet)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* feat(advanced): the driver's active GPU time and GPU frame time as two lines of their own; the GPU render label says what it includes; the multiplier row lists every value seen; the texts say two real games were read - Privacy Policy 2.21, Disclaimer 2.17 (D142-D145; in no release yet)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 10:41:29 +07:00
poli0981 63af4eb38c Merge branch 'beta48/pr2-agent-app' into beta48/pr3-sampling-period 2026-11-14 10:24:07 +07:00
poli0981andClaude Fable 5.2 be10e68506 fix(telemetry): the poller keeps its period - it waited the whole interval after a poll's work, and on the owner's PC a second was 1.32 s; sensor_blobs.hz is the rate the samples had, not the constant 1 (D146; in no release yet)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 10:24:07 +07:00
poli0981 0058b7c167 Merge commit '33a5da13733e947d0f6ff90c172818d02b7b6b3b' into beta48/pr2-agent-app
# Conflicts:
#	CHANGELOG.md
2026-11-14 10:17:41 +07:00
poli0981andClaude Fable 5.2 33a5da1373 feat(overlay): two more members of NVIDIA's latency report - the driver's active GPU time and its GPU frame time - and every frame-generation multiplier a session saw; four reserved words, layout still 5; a read left by the session before is dropped (D142, D144; in no release yet) (#450)
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 10:16:39 +07:00
poli0981andClaude Fable 5.2 a936466f5f feat(advanced): the driver's active GPU time and GPU frame time as two lines of their own; the GPU render label says what it includes; the multiplier row lists every value seen; the texts say two real games were read - Privacy Policy 2.21, Disclaimer 2.17 (D142-D145; in no release yet)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 10:04:27 +07:00
28 changed files with 467 additions and 55 deletions

No files matched your search

+28
View File
@@ -37,6 +37,14 @@ numeric core and does not move; the heading is the full version — corrected 20
### Added
- **Two more lines from NVIDIA's latency report: how long the graphics card was really at work** (owner decision
D142). In a real game the driver's *GPU render* stage turned out longer than the whole frame: it runs from the
card's start to its end and includes the time the card waited. With Advanced metrics on, a session now also
stores two figures the driver works out itself — **GPU active render**, the same stage without the waiting, and
**GPU frame time**, from the end of one frame's work to the end of the next — as a second chart under *Latency*.
They come from the report FrameLedger already asks the driver for; nothing more is asked. A driver may give
neither, and the chart is then not there. Sessions recorded before this release do not have them.
- **For developers: the part inside a game reads two more figures of NVIDIA's latency report, and keeps every
frame-generation multiplier a session saw** (owner decisions D142, D144; nothing a user sees until the Agent and
the App read them). In a real game the driver's span between its two GPU marks was longer than the frame's whole
@@ -45,8 +53,28 @@ numeric core and does not move; the heading is the full version — corrected 20
reserved words of the shared memory carry them and the multipliers seen (layout 5 as it was). `fl_reflex_summary`
and the injected `[latency]` cases hold it. Measured: +36 ns a read, once a second.
### Changed
- **The *GPU render* line says what it includes** (owner decision D143): *GPU render, start to end (idle time
included)*, in the three languages. The numbers are the same.
- **The driver's frame-generation multiplier is every value the session saw** (owner decision D144). The table of
the driver's low-latency state kept only the last one: a session that generated frames at ×2 and ended in a menu
showed 1. It now shows *1, 2*. Sessions already recorded keep what they stored.
- **The texts say what was read** (owner decision D145). The accuracy statement, the README and the guide said no
real game had been read; two have been, on one driver. They also say now that the stages overlap and do not add
up to the total. **Privacy Policy 2.21** names the two new averages; **Disclaimer 2.17** changes only with the
accuracy statement it carries. The terms window shows once.
### Fixed
- **Sensors were read less often than the setting says** (owner decision D146). With the sensor interval at
1000 ms, nearly every session on the owner's PC got a sample every 1.3 seconds: the Agent waited the whole
interval *after* each reading, and a reading there takes about a third of a second (what in it does is not
established; on a PC where the Agent is not run as administrator it takes a millisecond, and the samples were
already a second apart). It now keeps the period. No chart was wrong — every sample is stored with its own time — but a session
has about a third more samples now, and about a quarter of the readings of NVIDIA's latency report no longer
fall between two samples. For developers: `sensor_blobs.hz` was the constant 1 and is now the rate the
session's samples had.
- **A session could start with the last read of the session before it.** In a game that kept running between two
sessions, a read of the driver's latency report that ended after the first session's last tick was taken as the
second session's first point. A new session now drops it.
+5 -2
View File
@@ -128,8 +128,11 @@ shown is recorded too, from outside the game. ([Capture](docs/04_CAPTURE.md))
shader-compilation stutter are **not measured yet** — they read N/A. ([Accuracy](legal/ACCURACY.md))
- **NVIDIA's own latency report** is read only with *Advanced metrics* on, only on an NVIDIA card, only in a
Direct3D 12 game that uses NVIDIA Reflex: how long the driver says each stage of a frame took, about once a
second. They are the driver's numbers, not FrameLedger's measurement. FrameLedger asks the driver for them from
inside the game; a read that is slow or faults is switched off until the game is closed, and the session says so.
second. They are the driver's numbers, not FrameLedger's measurement. **The stages overlap and do not add up to
the total**, and the graphics card's stage includes the time the card waited — in one game it is longer than the
whole frame; the driver's own figure for the card's active time is shown beside it where the driver gives one.
One point is one reading; with the sensor interval set above one second, some readings are not stored.
FrameLedger asks the driver for them from inside the game; a read that is slow or faults is switched off until the game is closed, and the session says so.
([Advanced metrics](guide/12-advanced-metrics.md))
## The game's memory
+7 -4
View File
@@ -93,9 +93,12 @@ app too (Help ▸ User guide, Help ▸ Limitations, Help ▸ Accessibility), and
> long the driver says each stage of a frame took — simulation, render submit, present, driver, the operating
> system's queue, the graphics card — read from the graphics driver about once a second and shown as the driver
> reported it: **the driver's numbers, not a measurement by FrameLedger**, an average of the frames of one read,
> never checked against another tool, and not the delay from a click to the screen. Read with a test program
> against one driver and one card; **no real game had been read when this was written**. A game that does not use
> Reflex has none. The session summary's latency fields stay N/A.
> never checked against another tool, and not the delay from a click to the screen. **The stages overlap and do
> not add up to the total.** The graphics card's stage runs from its start to its end and includes the time the
> card waited — in one game it was longer than the whole frame — so since beta.48 two figures the driver works
> out itself are shown beside it: the card's active time, and the time from one frame's end to the next. A
> driver may give neither, and then there is no line. Read in two real games, on one driver and one card
> (2026-11-14). A game that does not use Reflex has none. The session summary's latency fields stay N/A.
> - **Pacing, VSync and the graphics card (since beta.14):** the share of the time below 30 FPS, below 60 FPS and below
> the monitor's refresh rate, measured from frame times with small margins so that a game held at its limit is not
> counted as below it (a rate less than 2 % under the line reads partly as at it), and how much one frame's time
@@ -258,7 +261,7 @@ FrameLedger is GPL-3.0-only free software, and you are welcome to build it, chan
| `FrameLedger.Overlay.dll` | Inside the game | C++20 hooks + lock-free shared-memory writer. Records only; never analyzes, allocates, or blocks |
| `FrameLedger.VkLayer.dll` | Inside the game | Vulkan implicit layer (Vulkan titles use this instead of injection) |
GPU telemetry is layered so the project never depends on a proprietary vendor licence: a vendor-neutral DXGI/performance-counter baseline, LibreHardwareMonitor (MPL-2.0) for sensors on all vendors, and NVIDIA's NVAPI SDK (MIT) for NVIDIA-only extras (telemetry and the driver's DLSS record today; Reflex latency is not read yet). No Intel or AMD GPU *telemetry* SDK is bundled — see `docs/18_GPU_VENDOR_APIS.md` for why. The one AMD component in the tree is five MIT headers from the FidelityFX SDK, used for types only so the upscaler hook can read an FSR title's own dispatch descriptor; nothing AMD-built is linked or redistributed.
GPU telemetry is layered so the project never depends on a proprietary vendor licence: a vendor-neutral DXGI/performance-counter baseline, LibreHardwareMonitor (MPL-2.0) for sensors on all vendors, and NVIDIA's NVAPI SDK (MIT) for NVIDIA-only extras (telemetry and the driver's DLSS record; and, with Advanced metrics on, the driver's own latency report, read inside a Direct3D 12 game that uses NVIDIA Reflex). No Intel or AMD GPU *telemetry* SDK is bundled — see `docs/18_GPU_VENDOR_APIS.md` for why. The one AMD component in the tree is five MIT headers from the FidelityFX SDK, used for types only so the upscaler hook can read an FSR title's own dispatch descriptor; nothing AMD-built is linked or redistributed.
---
+1 -1
View File
@@ -36,7 +36,7 @@ Let `D` = session duration (first → last present), `F_app` = frames the *game*
| **Frametime σ** | population stddev of `ft_app` (ms) | 1 |
| **Stutter count** | `ft_app[i] > 2 × rollingMedian(ft_app, 19)` (centered, window in **frames**) | 1 |
| **Stutter time %** | `Σ ft_app[stutter] / Σ ft_app × 100` | 1 |
| **PC latency** | mean/p95 of `reflexLatencyUs` when Reflex reports it *(nothing fills `reflexLatencyUs`: a report arrives after its frame's record is written. Since train C, 2026-11-13, the driver's stage report is read as seven Advanced series beside the frames — `18_GPU_VENDOR_APIS` §The inventory — and these session fields stay N/A)* | **1 only** |
| **PC latency** | mean/p95 of `reflexLatencyUs` when Reflex reports it *(nothing fills `reflexLatencyUs`: a report arrives after its frame's record is written. Since train C, 2026-11-13, the driver's stage report is read as seven Advanced series beside the frames — `18_GPU_VENDOR_APIS` §The inventory — and these session fields stay N/A; asked again on 2026-11-14 with two real games read, the owner kept them N/A (D147): the driver's total runs from simulation start to the graphics card's end, not from an input to the display)* | **1 only** |
| **PSO stutter %** | share of stutter frames with `psoCreatedThisFrame > 0` | **1 only** |
| **Time below 30 / 60 FPS** (beta.14) | share of `Σ ft_app` in frames that count as below X — `ft > 1.10 × 1000/X`, or the nine-frame rolling median `> 1.02 × 1000/X` (§Pacing) | 1 |
| **Time below refresh** (beta.14) | the same over **presents**, X = `display_monitor_hz` — the display's rate, so over what the display received | 1 |
+16
View File
@@ -496,6 +496,22 @@ Because Tier-1 and Tier-2 sessions carry different fields, every query that comp
> Sensor series are aligned to `t_ms` (milliseconds from `qpc_epoch`) and a tick with no reading is stored as
> **−1** — never 0, which would be a reading — because temperatures, loads, power and memory are never negative.
>
> **`t_ms` is the time axis; `hz` is the fallback** (written here 2026-11-14, owner decision D146 — the code cited
> this rule before the page had it). Every series of a session is stored beside `t_ms`, which carries each
> sample's own time, and the App draws against it; `hz` is read only for a row that has no `t_ms`
> (`SessionSeriesLoader`). **Until 0.1.0-beta.48 `hz` was the constant 1**, whatever the samples did — and they
> were not one second apart: the poller waited its whole interval *after* a poll's work. In the owner's ledger of
> 2026-11-14, under a setting of 1000 ms, 180 of the 186 sessions long enough to tell have a median of 1.32 s
> between samples; six have 1.0 s. **What takes the third of a second is not established.** Unelevated — the layers
> composed as the Agent composes them, each read under a stopwatch — a poll takes about a millisecond. The two
> sessions with no `cpu_temp` series (an Agent that was not elevated) are among the six, which points at the
> sensor library's processor update, run on the poll's thread as administrator with PawnIO; but four sessions
> that have the series kept one second, and the call itself was not timed (it needs elevation). Since 0.1.0-beta.48 the poller keeps a fixed period
> (`TelemetryPoller.UntilNextTick`) and `hz` is the rate the session's samples had, measured from the samples
> (`SessionFinalizer.SampleRate`: the gaps between the first and the last over the time between them, to a
> thousandth; 1 for fewer than two) — so it is right for a session recovered from a `.partial` file as well.
> Rows written before keep their 1.
>
> **The advanced series are the exception, and say so by their name (schema 0023, owner decision D102).** A series
> whose name starts with `adv.` stores **NaN** for a tick with no reading: a motherboard's −12 V rail is negative, so
> −1 cannot mark a gap, and most of its ticks are gaps — the sensor library is read every fifth. They go through a
+13 -1
View File
@@ -872,6 +872,11 @@ planning, the design reviewed against the code before it was approved.
- **Privacy Policy 2.18** at beta.44 (approved with that release's plan): 2.17 named two further calls and what
they give; Streamline's answers about a feature are in neither list, so they are named, with what of the answer
is never read — the lists it points to.
- **Privacy Policy 2.21 and Disclaimer 2.17** at beta.48 (wording approved with the plan of 2026-11-14, D145):
the Privacy Policy names the two further averages a session stores of the driver's report and that the
frame-generation multiplier is every value the session saw; the Disclaimer changes only with the accuracy
statement it carries, which now says two real games were read, that the stages overlap, and that the graphics
card's stage includes its waiting. No new call: the paragraph on the call the component makes is as it was.
- **Privacy Policy 2.20 and Disclaimer 2.16** at beta.47, train C (wording approved with the plan of
2026-11-13): the first thing read inside a game that is **not an argument of a call the game made**. The Privacy
Policy names what is stored — how long each stage of a frame took, as the driver reports it, and the driver's
@@ -1089,7 +1094,13 @@ only while a session records Advanced metrics, only for a Direct3D 12 game that
`nvapi64.dll`. The report becomes seven series — `adv.nvapi.reflex.frame_report.` and `simulation`,
`render_submit`, `present`, `driver`, `os_queue`, `gpu_render`, `total` — each point the mean, in microseconds, of
the frames one read summed; the sleep status becomes one table of the driver's five switches as seen over the
session. What the *game* asked of Reflex (`nvapi.reflex.mode`) is an argument of a function no module exports:
session and, since 0.1.0-beta.48 (D144), every frame-generation multiplier it gave (it kept the last one, and a
session that ended in a menu read 1). **Since 0.1.0-beta.48 (D142) two more series, an entry of their own** —
`adv.nvapi.reflex.gpu_times.` and `active_render`, `frame_time` — the driver's `gpuActiveRenderTimeUs` and
`gpuFrameTimeUs`, each the mean over the frames of that read that gave one. They are the driver's own figures, not
spans between two of its marks: in Phantom Blade Zero `gpu_render` (the two GPU marks, idle time included) was
longer than `total`, which is why its label now says what it includes (D143). An entry of their own keeps the
seven spans within what one chart draws as lines. What the *game* asked of Reflex (`nvapi.reflex.mode`) is an argument of a function no module exports:
reading it takes a patch at an address learned at run time, which is refused.
| Id | What it is | Scope | Source | Reach | Unit |
@@ -1097,6 +1108,7 @@ reading it takes a patch at an address learned at run time, which is refused.
| `nvapi.reflex.mode` | Reflex: low-latency mode, boost, the frame-rate limit | SessionFact | Nvapi | RefusedRoute | Text |
| `nvapi.reflex.sleep_status` | What the driver's low-latency state is | SessionFact | Nvapi | GameDriver | Table |
| `nvapi.reflex.frame_report` | Latency per frame: simulation, render submit, present, driver, OS queue, GPU render | Series, one per device | Nvapi | GameDriver | Microseconds |
| `nvapi.reflex.gpu_times` | The graphics card's time per frame, as the driver works it out: active render, frame to frame | Series, one per device | Nvapi | GameDriver | Microseconds |
**Inside the game: routes a spike decides**
+11 -2
View File
@@ -204,8 +204,17 @@ is [`17_HOOK_ENGINE.md`](17_HOOK_ENGINE.md) §Calls the Overlay makes into a dri
brought up to date with the next release, as beta.46's pages were.
- **In Phantom Blade Zero the driver's *GPU render* span is longer than its total** (item 45): shown as reported,
not explained. In Cyberpunk 2077 it is not. The owner's answer: read the driver's active time (NEXT 2).
- **The Agent's samples are 1.32 s apart while `sensor_blobs.hz` says 1.0** (seen 2026-11-14 in the `t_ms` series,
in sessions back to beta.42). Not looked into: whether anything reads `hz` as the spacing.
- ~~**The Agent's samples are 1.32 s apart while `sensor_blobs.hz` says 1.0**~~ (seen 2026-11-14 in the `t_ms`
series). **Looked into the same day (D146)**: the poller waited its whole interval after a poll's work; only
the App's series loader reads `hz`, and only where a row has no `t_ms`, so no chart was wrong. The poller now
keeps a fixed period and `hz` is measured from the samples (`06_DATA_MODEL` §sensor_blobs) — in no release yet.
- **Where the third of a second goes is not established.** Unelevated, a poll takes about a millisecond (the
layers composed as the Agent composes them, each read under a stopwatch). In the owner's ledger 180 of 186
sessions are 1.32 s apart and six are 1.0 s: the two with no `cpu_temp` series (an Agent not elevated) are among
the six — which points at the sensor library's processor update, run on the poll's thread as administrator
with PawnIO — **but four sessions that have the series kept one second** (22, 72, 73, 136). **Not measured**:
that call itself (it needs elevation), and whether it is processor time or waiting. Not changed; the period no
longer depends on it. The owner's to say whether it is worth timing on their PC and moving off the poll's thread.
- **No test runs the whole path through the real Agent**: the injected tests stop at the shared memory and the
sampler's start from it; no end-to-end case loads the stand-in module under an Agent session.
- **Two install batches of beta.46 took 0.61 s and 1.26 s and nothing explains them** (Hogwarts Legacy, Cyberpunk
+14
View File
@@ -63,6 +63,20 @@ are kept because they record what each version changed and why (owner decision D
>
> Version 2.5 (2026-09-27, 0.1.0-beta.10) adds how a tracked game's window is shown — read from Windows — and the engine build name read from an Unreal Engine game's executable. It is also the first version to say two things the software already did: it reads the **content** of a library game's executable (markers in its first 8 MB and its import table, since the detection of engines and features; and, when a session starts, the graphics-library markers in the whole file), and it reads the processor load and the memory in use (since 0.1.0-beta.3). Nothing here leaves your device, as before.
### What version 2.21 of the Privacy Policy and 2.17 of the Disclaimer changed (0.1.0-beta.48)
**Two real games had been read, and the texts still said none** (owner decisions D142–D145; the wording's main
points approved with the plan of 2026-11-14). The accuracy statement — and so the README and the Disclaimer, which
carry it — said the driver's report had been "read with a test program against one driver and one card; no real
game had been read when this was written". On 2026-11-14 the owner read it in Phantom Blade Zero and Cyberpunk
2077, and the first of them showed something the statement did not say: the stages overlap, and the graphics
card's stage — the driver's start mark to its end mark — includes the card's waiting and was longer than the whole
frame. So the statement now says both, names the two figures of the driver's own that are shown beside that stage
since this release, and says a driver may give neither. The **Privacy Policy** (2.21) adds those two averages to
what a session stores, and "its frame-generation multiplier" becomes the multipliers the driver gave during the
session. The **Disclaimer** (2.17) changes nowhere else: the component makes no new call, so §2's paragraph on the
one call it makes stands as written.
### What version 2.20 of the Privacy Policy and 2.16 of the Disclaimer changed (0.1.0-beta.47, train C)
**The part inside a game makes a call of its own** (owner decisions D132, D136, D138–D141; the wording's main
+1 -1
View File
@@ -20,7 +20,7 @@ The link under them, *Read what the hook does and does not do*, opens the safety
| Setting | What it does | Default |
|---|---|---|
| **Minimum session length (s)** | A shorter session is not kept. 5 to 600 seconds. *Agent.* | 30 |
| **Sensor interval (ms)** | How often the PC's sensors are read during a session. 500 to 2000 ms. *Agent.* | 1000 |
| **Sensor interval (ms)** | How often the PC's sensors are read during a session. 500 to 2000 ms. With a value above 1000, not every reading of NVIDIA's latency report — made about once a second inside the game — becomes a point: each point is still one reading ([Advanced metrics](12-advanced-metrics.md)). *Agent.* | 1000 |
| **Raw series kept per game** | How many of each game's newest sessions keep their per-frame data; older ones keep their statistics. 0 keeps everything. *Agent.* | 20 |
| **Advanced metrics** | Reads more from the graphics driver and the hardware sensors during a session — the graphics card's memory and load in detail, each fan and voltage, what your display can do, the driver's settings for the game — and stores it with the session. In a game FrameLedger measures from inside it also reads what the game tells DLSS, Streamline and FSR, and — on an NVIDIA card, in a Direct3D 12 game that uses NVIDIA's library — asks the graphics driver about once a second how long each stage of a frame took ([Advanced metrics](12-advanced-metrics.md)). Off: nothing more is read or stored. It applies from the next session; a session recorded while it was off is not filled in later. While it is on, the **Advanced** page is in the list on the left ([Advanced metrics](12-advanced-metrics.md)). *Agent.* | Off |
+10 -3
View File
@@ -89,9 +89,16 @@ On an NVIDIA card, in a **Direct3D 12** game that uses **NVIDIA Reflex**, a sess
stores the driver's own latency report: how long the driver says each stage of a frame took — *simulation*,
*render submit*, *present*, *driver*, *operating system's render queue*, *GPU render*, and the *total* from the start
of simulation to the end of the graphics card's work. They are seven lines under **Latency**, one point about every
second, each the average of the frames the driver reported since the point before, in microseconds. A table beside
them shows the driver's low-latency state as five switches, by NVIDIA's own names, each *On*, *Off* or *On at times,
off at others*.
second, each the average of the frames of one reading, in microseconds. A table beside them shows the driver's
low-latency state as five switches, by NVIDIA's own names, each *On*, *Off* or *On at times, off at others*, and
`fgMultiplier`: every frame-generation multiplier the driver gave during the session (*1, 2* is a session that
generated frames at ×2 for part of it).
**The stages overlap; they are not parts that add up to the total.** And *GPU render, start to end* includes the
time the card spent waiting between pieces of work — in one game it is longer than the whole frame. So a second
chart, **the graphics card's time per frame, as the driver works it out**, has two lines of the driver's own
figures: *GPU active render*, the same stage without the waiting, and *GPU frame time*, from the end of one
frame's work to the end of the next. A driver may give neither; the chart is then not there, and nothing is wrong.
Three things to know about them:
+6 -3
View File
@@ -92,9 +92,12 @@
> long the driver says each stage of a frame took — simulation, render submit, present, driver, the operating
> system's queue, the graphics card — read from the graphics driver about once a second and shown as the driver
> reported it: **the driver's numbers, not a measurement by FrameLedger**, an average of the frames of one read,
> never checked against another tool, and not the delay from a click to the screen. Read with a test program
> against one driver and one card; **no real game had been read when this was written**. A game that does not use
> Reflex has none. The session summary's latency fields stay N/A.
> never checked against another tool, and not the delay from a click to the screen. **The stages overlap and do
> not add up to the total.** The graphics card's stage runs from its start to its end and includes the time the
> card waited — in one game it was longer than the whole frame — so since beta.48 two figures the driver works
> out itself are shown beside it: the card's active time, and the time from one frame's end to the next. A
> driver may give neither, and then there is no line. Read in two real games, on one driver and one card
> (2026-11-14). A game that does not use Reflex has none. The session summary's latency fields stay N/A.
> - **Pacing, VSync and the graphics card (since beta.14):** the share of the time below 30 FPS, below 60 FPS and below
> the monitor's refresh rate, measured from frame times with small margins so that a game held at its limit is not
> counted as below it (a rate less than 2 % under the line reads partly as at it), and how much one frame's time
+7 -4
View File
@@ -1,6 +1,6 @@
# FrameLedger — Disclaimer
**Version:** 2.16 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.17 · **Effective:** {{RELEASE_DATE}}
## 0. This is pre-release software
@@ -205,9 +205,12 @@ Frame timing is derived from high-resolution timestamps taken at the moment the
> long the driver says each stage of a frame took — simulation, render submit, present, driver, the operating
> system's queue, the graphics card — read from the graphics driver about once a second and shown as the driver
> reported it: **the driver's numbers, not a measurement by FrameLedger**, an average of the frames of one read,
> never checked against another tool, and not the delay from a click to the screen. Read with a test program
> against one driver and one card; **no real game had been read when this was written**. A game that does not use
> Reflex has none. The session summary's latency fields stay N/A.
> never checked against another tool, and not the delay from a click to the screen. **The stages overlap and do
> not add up to the total.** The graphics card's stage runs from its start to its end and includes the time the
> card waited — in one game it was longer than the whole frame — so since beta.48 two figures the driver works
> out itself are shown beside it: the card's active time, and the time from one frame's end to the next. A
> driver may give neither, and then there is no line. Read in two real games, on one driver and one card
> (2026-11-14). A game that does not use Reflex has none. The session summary's latency fields stay N/A.
> - **Pacing, VSync and the graphics card (since beta.14):** the share of the time below 30 FPS, below 60 FPS and below
> the monitor's refresh rate, measured from frame times with small margins so that a game held at its limit is not
> counted as below it (a rate less than 2 % under the line reads partly as at it), and how much one frame's time
+2 -2
View File
@@ -1,6 +1,6 @@
# FrameLedger — Privacy Policy
**Version:** 2.20 · **Effective:** {{RELEASE_DATE}}
**Version:** 2.21 · **Effective:** {{RELEASE_DATE}}
**Short version: everything stays on your PC. FrameLedger has no accounts, no telemetry, no analytics, and never uploads your data anywhere.**
@@ -11,7 +11,7 @@ Stored in `%LOCALAPPDATA%\FrameLedger` on your device:
- Your game library entries (names, executable paths, metadata you or the app filled in, and whether each one is recorded).
- Images you choose for a game (Edit…), copied into the `covers` folder; choosing the store's image again, or removing the game together with its sessions, deletes the copy. Artwork a store's app keeps on your PC, or a game ships in its own folder, is shown from where it is and not copied.
- Performance sessions: frame timing series, computed statistics, hardware sensor series (temperatures, load, power, memory usage, and the graphics card's clock speeds, fan speed, memory temperature and whether its power limit or heat held it back), the game's own memory use (its dedicated and shared video memory, private working set, working set and commit, once a second), session duration, crash flags, the graphics driver's settings the game ran under (NVIDIA only), how the game's window was shown (full-screen, borderless or windowed, for how long, its size and the monitor's), tags and notes you write.
- **Only while Settings ▸ Advanced metrics is on** (it is off unless you switch it on), with each session: more hardware sensor series — the graphics card's memory use in detail, its load by part, its clocks, voltages, currents, power, each fan and its video encoder's use; and, when the capture agent runs as administrator with PawnIO installed, the processor's temperatures, load, clocks, power and voltages by core, the memory in use and its modules' temperatures, and the motherboard's temperatures, fans and voltages — and a description of the hardware: the graphics card's firmware version, architecture, bus and memory sizes, the graphics driver's package and the chipset it names, the motherboard's and the memory modules' model names, what each connected display can do (the HDR formats it accepts, its brightness range, variable refresh), whether variable refresh was in use on the display the game ran on and the colour space the game presented in, and the graphics driver's settings — its global ones and the ones it holds for the game (NVIDIA only). For a game FrameLedger injects into, a session then also stores what the game itself passed to its upscaler in the calls FrameLedger intercepts: the output size, the model presets and the exposure values it gave DLSS, whether it said its colour buffers are HDR, auto-exposure and alpha upscaling; and the sharpening, the size of the jitter, the exposure, the depth range, the lowest and highest field of view and the flags it gave FSR, the frame time it reported to FSR, and FSR's own video memory when the game asked for it; what the game told NVIDIA Streamline about each frame — the size of the jitter, the motion-vector scale, the depth range and whether depth is inverted, the lowest and highest field of view, the aspect ratio, whether the projection is orthographic, how its motion vectors are stored and how often it reset the upscaler's history; and how it configured FSR frame generation — on or off, whether it may run asynchronously, its flags, whether only generated frames are presented, and the rectangle it generates in; and what NVIDIA Streamline answered when the game asked it about a feature — which features the game asked about, the version of each and of its NGX model, and what each requires: the graphics APIs it supports, whether V-Sync must be off and hardware-accelerated GPU scheduling on, how many processor threads, viewports and buffers, and the versions of Windows and of the graphics driver that Streamline found beside the ones the feature needs ; and, for each Streamline feature the game asks about or controls: whether Streamline answers that it is supported, whether it is loaded, whether the game switched it on or off while it ran, and how many times its resources were allocated and freed; and whether the game shut Streamline down, and how many times — never the lists Streamline's answer points to (the buffers' names, the names of Vulkan extensions and features), never what identifies the graphics card that the game hands over with its question, never the content of a graphics resource, and never where the game's camera is, which way it looks, or its matrices. For a Direct3D 12 game that had itself loaded NVIDIA's driver library, a session also stores what the graphics driver reports about the game's frames when FrameLedger asks it, about once a second, from inside the game: how long each stage of a frame took — simulation, render submit, present, the driver, the operating system's queue and the graphics card, and the whole from the start of simulation to the end of the graphics card's work — as averages in microseconds, and the driver's low-latency state (five switches it reports, and its frame-generation multiplier) — never a time of day, and never the moment the player pressed anything. No serial number, no display identification data (EDID) and no list of other programs is read or stored. Switching the option off stops the reading, inside a game as well; what earlier sessions stored stays with them until you delete those sessions.
- **Only while Settings ▸ Advanced metrics is on** (it is off unless you switch it on), with each session: more hardware sensor series — the graphics card's memory use in detail, its load by part, its clocks, voltages, currents, power, each fan and its video encoder's use; and, when the capture agent runs as administrator with PawnIO installed, the processor's temperatures, load, clocks, power and voltages by core, the memory in use and its modules' temperatures, and the motherboard's temperatures, fans and voltages — and a description of the hardware: the graphics card's firmware version, architecture, bus and memory sizes, the graphics driver's package and the chipset it names, the motherboard's and the memory modules' model names, what each connected display can do (the HDR formats it accepts, its brightness range, variable refresh), whether variable refresh was in use on the display the game ran on and the colour space the game presented in, and the graphics driver's settings — its global ones and the ones it holds for the game (NVIDIA only). For a game FrameLedger injects into, a session then also stores what the game itself passed to its upscaler in the calls FrameLedger intercepts: the output size, the model presets and the exposure values it gave DLSS, whether it said its colour buffers are HDR, auto-exposure and alpha upscaling; and the sharpening, the size of the jitter, the exposure, the depth range, the lowest and highest field of view and the flags it gave FSR, the frame time it reported to FSR, and FSR's own video memory when the game asked for it; what the game told NVIDIA Streamline about each frame — the size of the jitter, the motion-vector scale, the depth range and whether depth is inverted, the lowest and highest field of view, the aspect ratio, whether the projection is orthographic, how its motion vectors are stored and how often it reset the upscaler's history; and how it configured FSR frame generation — on or off, whether it may run asynchronously, its flags, whether only generated frames are presented, and the rectangle it generates in; and what NVIDIA Streamline answered when the game asked it about a feature — which features the game asked about, the version of each and of its NGX model, and what each requires: the graphics APIs it supports, whether V-Sync must be off and hardware-accelerated GPU scheduling on, how many processor threads, viewports and buffers, and the versions of Windows and of the graphics driver that Streamline found beside the ones the feature needs ; and, for each Streamline feature the game asks about or controls: whether Streamline answers that it is supported, whether it is loaded, whether the game switched it on or off while it ran, and how many times its resources were allocated and freed; and whether the game shut Streamline down, and how many times — never the lists Streamline's answer points to (the buffers' names, the names of Vulkan extensions and features), never what identifies the graphics card that the game hands over with its question, never the content of a graphics resource, and never where the game's camera is, which way it looks, or its matrices. For a Direct3D 12 game that had itself loaded NVIDIA's driver library, a session also stores what the graphics driver reports about the game's frames when FrameLedger asks it, about once a second, from inside the game: how long each stage of a frame took — simulation, render submit, present, the driver, the operating system's queue and the graphics card, and the whole from the start of simulation to the end of the graphics card's work — as averages in microseconds, with two figures the driver works out itself (how long the graphics card was actually at work on a frame, and the time from the end of one frame's work to the end of the next), and the driver's low-latency state (five switches it reports, and the frame-generation multipliers it gave during the session) — never a time of day, and never the moment the player pressed anything. No serial number, no display identification data (EDID) and no list of other programs is read or stored. Switching the option off stops the reading, inside a game as well; what earlier sessions stored stays with them until you delete those sessions.
- A hardware snapshot per session (CPU/GPU model, driver version, RAM size, OS build, display mode) used for the "what changed between sessions" feature.
- App settings, logs (rotated daily — the app keeps 7 days, the capture agent 14 — including the logs written by the component loaded into games), and, after a crash of the app itself, crash dump files.
- Which games you enabled code injection for, and when you consented.
+9
View File
@@ -193,6 +193,7 @@ public static class Strings
nameof(Adv_nvapi_load_video),
nameof(Adv_nvapi_pstate),
nameof(Adv_nvapi_reflex_frame_report),
nameof(Adv_nvapi_reflex_gpu_times),
nameof(Adv_nvapi_reflex_mode),
nameof(Adv_nvapi_reflex_sleep_status),
nameof(Adv_nvapi_session_driver_profile),
@@ -346,6 +347,7 @@ public static class Strings
nameof(AdvSource_PawnIoMissing),
nameof(AdvSource_Reading),
nameof(AdvSource_Unknown),
nameof(AdvToken_active_render),
nameof(AdvToken_adaptive_sync),
nameof(AdvToken_agp),
nameof(AdvToken_axi),
@@ -358,6 +360,7 @@ public static class Strings
nameof(AdvToken_driver_default),
nameof(AdvToken_edr),
nameof(AdvToken_fpci),
nameof(AdvToken_frame_time),
nameof(AdvToken_game_ready),
nameof(AdvToken_gpu_render),
nameof(AdvToken_gsync_module),
@@ -1887,6 +1890,8 @@ public static class Strings
public static string Adv_nvapi_reflex_frame_report => ResourceManager.GetString(nameof(Adv_nvapi_reflex_frame_report), Culture) ?? nameof(Adv_nvapi_reflex_frame_report);
public static string Adv_nvapi_reflex_gpu_times => ResourceManager.GetString(nameof(Adv_nvapi_reflex_gpu_times), Culture) ?? nameof(Adv_nvapi_reflex_gpu_times);
public static string Adv_nvapi_reflex_mode => ResourceManager.GetString(nameof(Adv_nvapi_reflex_mode), Culture) ?? nameof(Adv_nvapi_reflex_mode);
public static string Adv_nvapi_reflex_sleep_status => ResourceManager.GetString(nameof(Adv_nvapi_reflex_sleep_status), Culture) ?? nameof(Adv_nvapi_reflex_sleep_status);
@@ -2193,6 +2198,8 @@ public static class Strings
public static string AdvSource_Unknown => ResourceManager.GetString(nameof(AdvSource_Unknown), Culture) ?? nameof(AdvSource_Unknown);
public static string AdvToken_active_render => ResourceManager.GetString(nameof(AdvToken_active_render), Culture) ?? nameof(AdvToken_active_render);
public static string AdvToken_adaptive_sync => ResourceManager.GetString(nameof(AdvToken_adaptive_sync), Culture) ?? nameof(AdvToken_adaptive_sync);
public static string AdvToken_agp => ResourceManager.GetString(nameof(AdvToken_agp), Culture) ?? nameof(AdvToken_agp);
@@ -2217,6 +2224,8 @@ public static class Strings
public static string AdvToken_fpci => ResourceManager.GetString(nameof(AdvToken_fpci), Culture) ?? nameof(AdvToken_fpci);
public static string AdvToken_frame_time => ResourceManager.GetString(nameof(AdvToken_frame_time), Culture) ?? nameof(AdvToken_frame_time);
public static string AdvToken_game_ready => ResourceManager.GetString(nameof(AdvToken_game_ready), Culture) ?? nameof(AdvToken_game_ready);
public static string AdvToken_gpu_render => ResourceManager.GetString(nameof(AdvToken_gpu_render), Culture) ?? nameof(AdvToken_gpu_render);
+13 -1
View File
@@ -385,6 +385,10 @@
<value>フレームごとの遅延: シミュレーション、レンダー送信、プレゼント、ドライバー、OS キュー、GPU レンダー</value>
<comment>review</comment>
</data>
<data name="Adv_nvapi_reflex_gpu_times" xml:space="preserve">
<value>ドライバーが算出するフレームごとの GPU 時間: 実描画時間、フレーム間隔</value>
<comment>review</comment>
</data>
<data name="Adv_nvapi_reflex_mode" xml:space="preserve">
<value>Reflex: 低遅延モード、ブースト、フレーム レート制限</value>
<comment>review</comment>
@@ -1049,8 +1053,16 @@
<value>Game Ready</value>
<comment>review</comment>
</data>
<data name="AdvToken_active_render" xml:space="preserve">
<value>GPU 実描画 (待機時間を除く)</value>
<comment>review</comment>
</data>
<data name="AdvToken_frame_time" xml:space="preserve">
<value>GPU フレーム時間 (前のフレームの終了から次の終了まで)</value>
<comment>review</comment>
</data>
<data name="AdvToken_gpu_render" xml:space="preserve">
<value>GPU 描画</value>
<value>GPU 描画、開始から終了まで (待機時間を含む)</value>
<comment>review</comment>
</data>
<data name="AdvToken_gsync_module" xml:space="preserve">
+10 -1
View File
@@ -294,6 +294,9 @@
<data name="Adv_nvapi_reflex_frame_report" xml:space="preserve">
<value>Latency per frame: simulation, render submit, present, driver, OS queue, GPU render</value>
</data>
<data name="Adv_nvapi_reflex_gpu_times" xml:space="preserve">
<value>The graphics card's time per frame, as the driver works it out: active render, frame to frame</value>
</data>
<data name="Adv_nvapi_reflex_mode" xml:space="preserve">
<value>Reflex: low-latency mode, boost, the frame-rate limit</value>
</data>
@@ -792,8 +795,14 @@
<data name="AdvToken_game_ready" xml:space="preserve">
<value>Game Ready</value>
</data>
<data name="AdvToken_active_render" xml:space="preserve">
<value>GPU active render (idle time excluded)</value>
</data>
<data name="AdvToken_frame_time" xml:space="preserve">
<value>GPU frame time, one frame's end to the next</value>
</data>
<data name="AdvToken_gpu_render" xml:space="preserve">
<value>GPU render</value>
<value>GPU render, start to end (idle time included)</value>
</data>
<data name="AdvToken_gsync_module" xml:space="preserve">
<value>G-SYNC module</value>
+10 -1
View File
@@ -289,6 +289,9 @@
<data name="Adv_nvapi_reflex_frame_report" xml:space="preserve">
<value>Độ trễ từng khung hình: mô phỏng, gửi lệnh dựng hình, present, driver, hàng đợi hệ điều hành, GPU dựng hình</value>
</data>
<data name="Adv_nvapi_reflex_gpu_times" xml:space="preserve">
<value>Thời gian của card đồ hoạ cho mỗi khung hình, do driver tự tính: lúc thực sự vẽ, và từ khung này sang khung kế</value>
</data>
<data name="Adv_nvapi_reflex_mode" xml:space="preserve">
<value>Reflex: chế độ độ trễ thấp, boost, giới hạn tốc độ khung hình</value>
</data>
@@ -787,8 +790,14 @@
<data name="AdvToken_game_ready" xml:space="preserve">
<value>Game Ready</value>
</data>
<data name="AdvToken_active_render" xml:space="preserve">
<value>GPU thực sự vẽ (không tính lúc nghỉ)</value>
</data>
<data name="AdvToken_frame_time" xml:space="preserve">
<value>nhịp khung của GPU, từ lúc xong khung này tới lúc xong khung kế</value>
</data>
<data name="AdvToken_gpu_render" xml:space="preserve">
<value>GPU vẽ</value>
<value>GPU vẽ, từ lúc bắt đầu tới lúc xong (gồm cả lúc nghỉ)</value>
</data>
<data name="AdvToken_gsync_module" xml:space="preserve">
<value>Mô-đun G-SYNC</value>
@@ -189,6 +189,9 @@ public static class AdvancedMetricCatalog
Session("nvapi.reflex.mode", Nvapi, RefusedRoute, Text, Latency, "Reflex: low-latency mode, boost, the frame-rate limit"),
Session("nvapi.reflex.sleep_status", Nvapi, GameDriver, Table, Latency, "What the driver's low-latency state is"),
SampledFamily("nvapi.reflex.frame_report", Nvapi, GameDriver, Microseconds, Latency, "Latency per frame: simulation, render submit, present, driver, OS queue, GPU render"),
// Two figures the driver works out itself, members of the same report (0.1.0-beta.48, D142): the span between
// its two GPU marks includes the card's idle time and was longer than a frame's whole in a real game.
SampledFamily("nvapi.reflex.gpu_times", Nvapi, GameDriver, Microseconds, Latency, "The graphics card's time per frame, as the driver works it out: active render, frame to frame"),
// ---- Inside the game: routes a spike decides ------------------------------------------------------------
Session("sl.dlss.optimal_settings", Streamline, Spike, Text, Upscaling, "The render size and sharpness DLSS recommends"),
@@ -44,11 +44,26 @@ public sealed class InGameAdvancedSampler
/// </summary>
public const string LatencySeriesStem = AdvancedMetric.SeriesPrefix + "nvapi.reflex.frame_report.";
/// <summary>
/// The stem of the two series of the driver's own times (0.1.0-beta.48, D142): <c>adv.nvapi.reflex.gpu_times.</c>
/// and one of <see cref="GpuTimes"/>. An entry of their own: they are figures the driver works out, not spans
/// between two of its marks, and the seven spans stay within what one chart draws as lines.
/// </summary>
public const string GpuTimesSeriesStem = AdvancedMetric.SeriesPrefix + "nvapi.reflex.gpu_times.";
private const double _mebibyte = 1024.0 * 1024.0;
// The two groups of LatState that say which sleep switches were seen on and off.
private const uint _sleepSeenBits =
(FlAdvancedState.LatSleepBits << FlAdvancedState.LatSleepSeenOnShift) | (FlAdvancedState.LatSleepBits << FlAdvancedState.LatSleepSeenOffShift);
// The spans of a frame the driver reports, in the order the capture side publishes their sums.
private static readonly string[] _latencySpans = ["simulation", "render_submit", "present", "driver", "os_queue", "gpu_render", "total"];
// The two times the driver works out itself: the card at work without its idle time, and one frame's GPU end to
// the next's. In the order the capture side publishes their sums.
private static readonly string[] _gpuTimes = ["active_render", "frame_time"];
// NV_GET_SLEEP_STATUS_PARAMS's five switches, by bit: the vendor's own names, shown as they are.
private static readonly string[] _sleepSwitches = ["bLowLatencyMode", "bFsVrr", "bCplVsyncOn", "bUseGameSleep", "bFullscreenIFlip"];
@@ -91,11 +106,14 @@ public sealed class InGameAdvancedSampler
/// switch seen over a session, the flags of the dispatch that have a name, "none", and what a field of view
/// that cannot be radians is said to be (D128). A flag bit nobody named is <c>bit_N</c> and is shown as it is.
/// </summary>
public static IReadOnlyList<string> Tokens { get; } = ["on", "off", "on_and_off", "none", _notRadians, .. _flagTokens, .. _latencySpans];
public static IReadOnlyList<string> Tokens { get; } = ["on", "off", "on_and_off", "none", _notRadians, .. _flagTokens, .. _latencySpans, .. _gpuTimes];
/// <summary>The seven spans of a frame, as the last part of a series' name; the App translates each (<c>AdvToken_*</c>).</summary>
public static IReadOnlyList<string> LatencySpans => _latencySpans;
/// <summary>The driver's two own times, as the last part of a series' name; the App translates each (<c>AdvToken_*</c>).</summary>
public static IReadOnlyList<string> GpuTimes => _gpuTimes;
private InGameAdvanced? _last;
private FlLatencyState _latencyState;
private bool _latencyFrames;
@@ -272,7 +290,7 @@ public sealed class InGameAdvancedSampler
_latencyFrames = true;
uint[] sums = [s.LatSimulationSumUs, s.LatSubmitSumUs, s.LatPresentSumUs, s.LatDriverSumUs, s.LatOsQueueSumUs, s.LatGpuSumUs, s.LatTotalSumUs];
var readings = new List<AdvancedReading>(sums.Length);
var readings = new List<AdvancedReading>(sums.Length + _gpuTimes.Length);
for (int span = 0; span < sums.Length; span++)
{
if (sums[span] != FlAdvancedState.LatSumNone)
@@ -281,6 +299,18 @@ public sealed class InGameAdvancedSampler
}
}
// The driver's two own times (D142): each the mean over the frames that gave one, so each has its own count.
// A driver that gives neither - an older one leaves both zero - has no point here, and not a zero.
uint[] gpuSums = [s.LatGpuActiveSumUs, s.LatGpuFrameSumUs];
uint[] gpuFrames = [s.LatGpuCounts & 0xFFFFu, s.LatGpuCounts >> 16];
for (int time = 0; time < gpuSums.Length; time++)
{
if (gpuFrames[time] != 0)
{
readings.Add(new AdvancedReading(GpuTimesSeriesStem + _gpuTimes[time], gpuSums[time] / (double)gpuFrames[time]));
}
}
return readings;
}
@@ -326,7 +356,8 @@ public sealed class InGameAdvancedSampler
}
// The driver's sleep status (train C): its five switches as seen over the session, by the vendor's own names, and
// the frame-generation multiplier it last gave. THE DRIVER'S WORDS: on the driver the probe ran against,
// every frame-generation multiplier it gave (D144: a session that generated x2 and ended in a menu read 1 while
// only the last one was kept). THE DRIVER'S WORDS: on the driver the probe ran against,
// bLowLatencyMode read off for a device whose game had just switched low latency on (spike-notes §31) - so this
// is never worded as "the game uses Reflex".
private static void AddDriverSleepStatus(InGameAdvanced published, List<AdvancedFact> facts)
@@ -346,15 +377,35 @@ public sealed class InGameAdvancedSampler
AddSwitch(rows, _sleepSwitches[bit], ((off >> bit) & 1u) | (((on >> bit) & 1u) << 1));
}
uint multiplier = s.LatState >> FlAdvancedState.LatFgMultiplierShift;
if (multiplier != 0)
if (MultipliersSeen(s.LatMultipliersSeen) is { } multipliers)
{
rows.Add(new AdvancedRow("fgMultiplier", multiplier.ToString(CultureInfo.InvariantCulture)));
rows.Add(new AdvancedRow("fgMultiplier", multipliers));
}
facts.Add(Fact("nvapi.reflex.sleep_status", AdvancedValue.OfRows(rows)));
}
// The multipliers a session saw, lowest first: bit n of the word is multiplier n, bit 31 stands for 31 and more.
// Bit 0 is a status that gave none, which is not a multiplier and is not listed.
private static string? MultipliersSeen(uint seen)
{
var values = new List<string>(4);
for (int multiplier = 1; multiplier < 31; multiplier++)
{
if ((seen & (1u << multiplier)) != 0)
{
values.Add(multiplier.ToString(CultureInfo.InvariantCulture));
}
}
if ((seen & (1u << 31)) != 0)
{
values.Add("\u2265 31");
}
return values.Count == 0 ? null : string.Join(", ", values);
}
// Whether Streamline says each feature is supported and loaded, and what the game did with it while the session
// watched (0.1.0-beta.45): two facts, rows named as the versions' are. A refusal is the answer to "is it
// supported", so the result is said by the vendor's own name whatever it is. A count that reached 15 stopped there.
@@ -847,7 +898,7 @@ public sealed class InGameAdvancedSampler
uint SlAspect,
ulong SlFlags,
ulong SlFeatures,
uint DriverSleep)
ulong DriverSleep)
{
public static FactKey Of(InGameAdvanced published)
{
@@ -889,8 +940,9 @@ public sealed class InGameAdvancedSampler
s.SlAspectBits,
Pair(s.SlFlagsSeenTrue, s.SlFlagsSeenFalse),
FeaturesHash(published),
// The driver's sleep status as seen and its multiplier: what the one latency fact is made of.
s.ValidMask.HasFlag(FlAdvancedValid.Latency) ? s.LatState >> FlAdvancedState.LatSleepSeenOnShift : 0u);
// The driver's sleep status as seen and the multipliers seen: what the one latency fact is made of.
// Not the LAST multiplier, which is no longer in the fact - it moves with every menu.
s.ValidMask.HasFlag(FlAdvancedValid.Latency) ? Pair(s.LatState & _sleepSeenBits, s.LatMultipliersSeen) : 0UL);
}
// The feature slots as one number (FNV-1a over the words of the slots in use): an answer that arrives, or one
@@ -33,7 +33,12 @@ public static class AdvancedSessionBuilder
/// </summary>
public const int MaxSeries = 256;
public static (IReadOnlyList<SensorBlob> Blobs, AdvancedSessionRow? Row) Build(IReadOnlyList<TelemetrySample> sensors, AdvancedSessionData? data, ISeriesCodec codec)
/// <summary>The session's advanced series as blobs, and its <c>session_advanced</c> row — nothing when there is neither a series nor data.</summary>
/// <param name="sensors">The session's samples, in order.</param>
/// <param name="data">What the session knew of the machine and itself, or null when the option was off.</param>
/// <param name="codec">How a series is encoded.</param>
/// <param name="hz">The rate the samples had (<see cref="SessionFinalizer.SampleRate"/>): stored with each series as the fallback for a reader with no <c>t_ms</c>.</param>
public static (IReadOnlyList<SensorBlob> Blobs, AdvancedSessionRow? Row) Build(IReadOnlyList<TelemetrySample> sensors, AdvancedSessionData? data, ISeriesCodec codec, double hz = 1)
{
ArgumentNullException.ThrowIfNull(sensors);
ArgumentNullException.ThrowIfNull(codec);
@@ -48,7 +53,7 @@ public static class AdvancedSessionBuilder
var stats = new Dictionary<string, SensorSeriesStats>(StringComparer.Ordinal);
for (int s = 0; s < names.Count; s++)
{
blobs.Add(new SensorBlob { Series = names[s], Hz = 1, Codec = codec.Tag, Data = codec.EncodeSparseFloat32(columns[s]) });
blobs.Add(new SensorBlob { Series = names[s], Hz = hz, Codec = codec.Tag, Data = codec.EncodeSparseFloat32(columns[s]) });
SeriesAggregates aggregates = SeriesAggregates.Of(columns[s].Select(static v => float.IsNaN(v) ? (double?)null : v));
if (aggregates.Count > 0)
{
@@ -59,7 +59,8 @@ public sealed class SessionFinalizer
// Advanced metrics (D102), both tiers: they are read by the Agent, not by a hook, so a session that was not
// hooked has them all the same. Nothing when the option was off - no series, no row.
(IReadOnlyList<SensorBlob> advancedBlobs, AdvancedSessionRow? advanced) = AdvancedSessionBuilder.Build(input.Sensors, input.Advanced, _codec);
double hz = SampleRate(input.Sensors, row.QpcFrequency);
(IReadOnlyList<SensorBlob> advancedBlobs, AdvancedSessionRow? advanced) = AdvancedSessionBuilder.Build(input.Sensors, input.Advanced, _codec, hz);
if (input.Hooked is null)
{
// A Tier-2 row has no frames and every sensor the machine provided (2026-09-22): the same averages a
@@ -67,7 +68,7 @@ public sealed class SessionFinalizer
return new FinalizedSession
{
Row = SessionAggregator.WithSensorAggregates(row with { Tier = CaptureTier.NotHooked }, input.Sensors),
Sensors = [.. EncodeSensors(input.Sensors, row.QpcEpoch, row.QpcFrequency), .. advancedBlobs],
Sensors = [.. EncodeSensors(input.Sensors, row.QpcEpoch, row.QpcFrequency, hz), .. advancedBlobs],
Advanced = advanced,
};
}
@@ -82,11 +83,32 @@ public sealed class SessionFinalizer
{
FirstPresentMs = FirstPresentMs(r.Dominant, row.QpcEpoch, row.QpcFrequency),
},
Sensors = [.. EncodeSensors(input.Sensors, row.QpcEpoch, row.QpcFrequency), .. advancedBlobs],
Sensors = [.. EncodeSensors(input.Sensors, row.QpcEpoch, row.QpcFrequency, hz), .. advancedBlobs],
Advanced = advanced,
};
}
/// <summary>
/// The rate the session's samples had, a second (owner decision D146): the gaps between the first and the last
/// over the time between them, to a thousandth. 1 where there are fewer than two samples or no time between them.
/// </summary>
/// <remarks>
/// Measured, not the configured interval: it is then right for a session recovered from a <c>.partial</c> file,
/// which never knew the setting, and for one whose poller could not keep its period. It is the FALLBACK for a
/// reader: every series is stored beside <c>t_ms</c>, which carries each sample's own time.
/// </remarks>
public static double SampleRate(IReadOnlyList<TelemetrySample> sensors, long qpcFrequency)
{
ArgumentNullException.ThrowIfNull(sensors);
if (sensors.Count < 2 || qpcFrequency <= 0)
{
return 1;
}
long span = sensors[^1].QpcTicks - sensors[0].QpcTicks;
return span <= 0 ? 1 : Math.Round((sensors.Count - 1) * (double)qpcFrequency / span, 3);
}
/// <summary>
/// The discard rule, the owner, then step 5: one transaction, then the retention sweep.
/// </summary>
@@ -248,7 +270,7 @@ public sealed class SessionFinalizer
}
/// <summary><c>t_ms</c> plus one series per field any sample carried, aligned to <c>t_ms</c>, −1 where a tick had no reading.</summary>
private List<SensorBlob> EncodeSensors(IReadOnlyList<TelemetrySample> sensors, ulong qpcEpoch, long qpcFrequency)
private List<SensorBlob> EncodeSensors(IReadOnlyList<TelemetrySample> sensors, ulong qpcEpoch, long qpcFrequency, double hz)
{
if (sensors.Count == 0)
{
@@ -257,34 +279,34 @@ public sealed class SessionFinalizer
var blobs = new List<SensorBlob>
{
Blob("t_ms", sensors, s => (float)((s.QpcTicks - (long)qpcEpoch) * 1000.0 / qpcFrequency)),
Blob("t_ms", sensors, hz, s => (float)((s.QpcTicks - (long)qpcEpoch) * 1000.0 / qpcFrequency)),
};
// One list (SensorSeriesCatalog) for the blobs and for sensor_stats_json; the game process's memory joined it in
// beta.12 (D43) — five series, MiB, both tiers.
foreach ((string name, Func<TelemetrySample, double?> select) in SensorSeriesCatalog.All)
{
AddIfAny(blobs, name, sensors, select);
AddIfAny(blobs, name, sensors, hz, select);
}
return blobs;
}
private void AddIfAny(List<SensorBlob> into, string series, IReadOnlyList<TelemetrySample> sensors, Func<TelemetrySample, double?> field)
private void AddIfAny(List<SensorBlob> into, string series, IReadOnlyList<TelemetrySample> sensors, double hz, Func<TelemetrySample, double?> field)
{
if (sensors.Any(s => field(s) is not null))
{
into.Add(Blob(series, sensors, s => field(s) is { } v ? (float)v : SensorMissing));
into.Add(Blob(series, sensors, hz, s => field(s) is { } v ? (float)v : SensorMissing));
}
}
private SensorBlob Blob(string series, IReadOnlyList<TelemetrySample> sensors, Func<TelemetrySample, float> value) => new()
private SensorBlob Blob(string series, IReadOnlyList<TelemetrySample> sensors, double hz, Func<TelemetrySample, float> value) => new()
{
Series = series,
// Nominal: the poller ticks once a second by default (TelemetryPollerOptions). The t_ms series stored beside every
// series carries each tick's real time, and that is what the App draws against; Hz is only its fallback for a row
// written without t_ms (06_DATA_MODEL §sensor_blobs).
Hz = 1,
// The rate the samples had (SampleRate; it was the constant 1 until 0.1.0-beta.48, whatever the samples did).
// The t_ms series stored beside every series carries each tick's real time, and that is what the App draws
// against; Hz is only its fallback for a row written without t_ms (06_DATA_MODEL §sensor_blobs).
Hz = hz,
Codec = _codec.Tag,
Data = _codec.EncodeFloat32([.. sensors.Select(value)]),
};
@@ -2,6 +2,7 @@
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Collections.Concurrent;
using System.Diagnostics;
using FrameLedger.Application.Advanced;
using FrameLedger.Application.Telemetry;
@@ -205,12 +206,34 @@ public sealed class TelemetryPoller : ITelemetryPoller
}
}
/// <summary>
/// How long to wait for the next tick of a fixed period (owner decision D146): ticks are due at whole intervals
/// from the loop's start, so the answer is what is left of the interval now running - more than nothing, at most
/// a whole interval. A poll that overran one or more periods is followed by the next tick still to come: the
/// ticks it missed are skipped, never run in a burst.
/// </summary>
/// <remarks>
/// Until 0.1.0-beta.48 the loop waited the whole interval AFTER a poll's work. In the owner's ledger nearly
/// every session has its samples 1.32 s apart under a setting of one second - so the part inside a game, which
/// reads the driver's latency report once a second, had a quarter of its reads fall between two samples. What
/// takes the third of a second is not established (06_DATA_MODEL §sensor_blobs): unelevated, a poll takes about
/// a millisecond. Whatever a poll costs, the period no longer depends on it.
/// </remarks>
public static TimeSpan UntilNextTick(TimeSpan elapsed, TimeSpan interval)
{
ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(interval, TimeSpan.Zero);
long into = elapsed <= TimeSpan.Zero ? 0 : elapsed.Ticks % interval.Ticks;
return TimeSpan.FromTicks(interval.Ticks - into);
}
private void Loop()
{
// The stopwatch, not the injected clock: this is about waiting, and a test's clock stands still.
long started = Stopwatch.GetTimestamp();
do
{
PollOnce();
}
while (!_stop.Wait(_options.Interval));
while (!_stop.Wait(UntilNextTick(Stopwatch.GetElapsedTime(started), _options.Interval)));
}
}
@@ -438,6 +438,33 @@ public sealed class AdvancedPresenterTests
Strings.ResourceManager.GetString(nameof(Strings.Advanced_Status_InGameDriver), c).Should().NotBeNullOrEmpty();
}
[Fact]
public void TheDriversTwoOwnTimesAreLinesOfAnEntryOfTheirOwnSoTheSevenSpansStayLines()
{
(AdvancedMetric? metric, string label) = AdvancedPresenter.Resolve("adv.nvapi.reflex.gpu_times.active_render", []);
metric!.Id.Should().Be("nvapi.reflex.gpu_times");
label.Should().Be(AdvancedLabels.Member(AdvancedLabels.Of(metric), Strings.AdvToken_active_render));
label.Should().NotContain("active_render", "the member is one of ours and is said in words");
// Nine series, two entries: neither chart is past what it draws as lines.
string[] series =
[
.. InGameAdvancedSampler.LatencySpans.Select(static span => InGameAdvancedSampler.LatencySeriesStem + span),
.. InGameAdvancedSampler.GpuTimes.Select(static time => InGameAdvancedSampler.GpuTimesSeriesStem + time),
];
AdvancedPresenter.Metrics(series, []).Select(static m => m.Id).Should().BeEquivalentTo("nvapi.reflex.frame_report", "nvapi.reflex.gpu_times");
// The span between the driver's two GPU marks says what it includes, in every language (D143).
foreach (string culture in new[] { "", "vi", "ja" })
{
string render = Strings.ResourceManager.GetString(nameof(Strings.AdvToken_gpu_render), CultureInfo.GetCultureInfo(culture))!;
string active = Strings.ResourceManager.GetString(nameof(Strings.AdvToken_active_render), CultureInfo.GetCultureInfo(culture))!;
render.Should().Contain("(", "the label carries what the span includes");
render.Should().NotBe(active);
}
}
[Fact]
public void TheSevenSpansOfTheDriversReportAreSeriesOfOneEntryLabelledInWords()
{
@@ -93,14 +93,17 @@ public sealed partial class AdvancedMetricCatalogTests
}
[Fact]
public void WhatThePartInsideAGameAsksTheDriverForItselfIsTwoEntriesOfNvapiAndNothingMore()
public void WhatThePartInsideAGameAsksTheDriverForItselfIsThreeEntriesOfNvapiAndNothingMore()
{
// Train C (owner decisions D132, D136, D138): the one reach that is not an argument of a hooked call. The
// Overlay calls NVIDIA's two read-only latency getters; tools/nvapi-readonly-check.ps1 holds that those two
// are the only NVAPI functions code loaded into a game may name. Two entries, and they stay two until an
// owner's ruling of the same kind names another.
// are the only NVAPI functions code loaded into a game may name. Two entries until 0.1.0-beta.48; the third
// (owner decision D142) is two more members of the report the first getter already filled - no further call.
// They stay three until an owner's ruling of the same kind names another.
string[] driver = [.. _all.Where(static m => m.Reach == AdvancedReach.GameDriver).Select(static m => m.Id)];
driver.Should().Equal("nvapi.reflex.sleep_status", "nvapi.reflex.frame_report");
driver.Should().Equal("nvapi.reflex.sleep_status", "nvapi.reflex.frame_report", "nvapi.reflex.gpu_times");
AdvancedMetricCatalog.Find("nvapi.reflex.gpu_times")!.IsFamily.Should().BeTrue("two series, the driver's own figures");
AdvancedMetricCatalog.Find("nvapi.reflex.gpu_times")!.Unit.Should().Be(AdvancedUnit.Microseconds);
_all.Where(static m => m.Reach == AdvancedReach.GameDriver).Should().OnlyContain(static m => m.Source == AdvancedSource.Nvapi && m.IsRead);
_all.Where(static m => m.Reach == AdvancedReach.GameDriver).Should().OnlyContain(static m => m.Scope != AdvancedScope.MachineFact, "what a driver says of a game's frames is of a session");
AdvancedMetricCatalog.Find("nvapi.reflex.frame_report")!.IsFamily.Should().BeTrue("seven series, one a span");
@@ -591,6 +591,7 @@ public sealed class InGameAdvancedSamplerTests
ValidMask = frames == 0 ? FlAdvancedValid.None : FlAdvancedValid.Latency,
// The stand-in driver's status: low-latency mode and the game's sleep on, the other three off, x2.
LatState = (uint)state | ((1u | 8u) << FlAdvancedState.LatSleepSeenOnShift) | ((2u | 4u | 16u) << FlAdvancedState.LatSleepSeenOffShift) | (2u << FlAdvancedState.LatFgMultiplierShift),
LatMultipliersSeen = 1u << 2,
LatReads = 1u | (slowestUs << 16),
LatFrames = frames,
LatSimulationSumUs = frames * 800,
@@ -626,6 +627,65 @@ public sealed class InGameAdvancedSamplerTests
sampler.Take(new InGameAdvanced(Latency(FlLatencyState.Reading, frames: 62, samples: 2) with { LatFrames = 0 })).Should().BeNull();
}
[Fact]
public void TheDriversTwoOwnTimesArePointsOfAnEntryOfTheirOwnEachTheMeanOfTheFramesThatGaveOne()
{
// 0.1.0-beta.48 (D142): sixty of sixty-two frames gave an active time, all of them a frame time.
IReadOnlyList<AdvancedReading> readings = new InGameAdvancedSampler().Take(new InGameAdvanced(Latency(FlLatencyState.Reading, frames: 62) with
{
LatGpuActiveSumUs = 60 * 3500,
LatGpuFrameSumUs = 62 * 4200,
LatGpuCounts = 60u | (62u << 16),
}))!;
readings.Should().HaveCount(9);
readings.Should().Contain(new AdvancedReading("adv.nvapi.reflex.gpu_times.active_render", 3500.0));
readings.Should().Contain(new AdvancedReading("adv.nvapi.reflex.gpu_times.frame_time", 4200.0));
readings.Should().Contain(new AdvancedReading("adv.nvapi.reflex.frame_report.gpu_render", 3700.0), "the span between the driver's two marks is kept beside them");
InGameAdvancedSampler.GpuTimes.Should().Equal("active_render", "frame_time");
// One and not the other: a frame can give either.
IReadOnlyList<AdvancedReading> one = new InGameAdvancedSampler().Take(new InGameAdvanced(Latency(FlLatencyState.Reading, frames: 62) with
{
LatGpuFrameSumUs = 10 * 4200,
LatGpuCounts = 10u << 16,
}))!;
one.Where(static r => r.Series.StartsWith(InGameAdvancedSampler.GpuTimesSeriesStem, StringComparison.Ordinal))
.Should().Equal(new AdvancedReading("adv.nvapi.reflex.gpu_times.frame_time", 4200.0));
// A driver that gives neither - an older one leaves both zero: no point, and not a zero.
new InGameAdvancedSampler().Take(new InGameAdvanced(Latency(FlLatencyState.Reading, frames: 62)))!
.Should().NotContain(static r => r.Series.StartsWith(InGameAdvancedSampler.GpuTimesSeriesStem, StringComparison.Ordinal));
}
[Fact]
public void TheMultiplierRowListsEveryValueTheSessionSawNotTheLastOne()
{
// D144: x2 while the game generated frames, then a menu - the last value is 1, and the session saw both.
var sampler = new InGameAdvancedSampler();
FlAdvancedState state = Latency(FlLatencyState.Reading, frames: 62) with
{
LatState = (uint)FlLatencyState.Reading | (1u << FlAdvancedState.LatSleepSeenOnShift) | (1u << FlAdvancedState.LatFgMultiplierShift),
LatMultipliersSeen = (1u << 1) | (1u << 2),
};
sampler.Take(new InGameAdvanced(state));
Rows(Fact(sampler, "nvapi.reflex.sleep_status")).Should().Equal("bLowLatencyMode=on", "fgMultiplier=1, 2");
// The last multiplier moves with every menu and is not in the table: the facts are not made again for it...
IReadOnlyList<AdvancedFact> before = sampler.Facts;
sampler.Take(new InGameAdvanced(state with { Samples = 2, LatState = state.LatState ^ (3u << FlAdvancedState.LatFgMultiplierShift) }));
sampler.Facts.Should().BeSameAs(before);
// ...and are for a value not seen before. Thirty-one and more share a bit; a status that gave none is not one.
sampler.Take(new InGameAdvanced(state with { Samples = 3, LatMultipliersSeen = 1u | (1u << 1) | (1u << 2) | (1u << 4) | (1u << 31) }));
Rows(Fact(sampler, "nvapi.reflex.sleep_status")).Should().Equal("bLowLatencyMode=on", "fgMultiplier=1, 2, 4, \u2265 31");
var none = new InGameAdvancedSampler();
none.Take(new InGameAdvanced(state with { LatMultipliersSeen = 1u }));
Rows(Fact(none, "nvapi.reflex.sleep_status")).Should().Equal("bLowLatencyMode=on");
}
[Fact]
public void ASpanTheDriverDidNotReportHasNoPointAndTheOthersDo()
{
@@ -58,6 +58,10 @@ public sealed class AdvancedSessionBuilderTests
blobs.Select(static b => b.Series).Should().Equal("adv.nvapi.pstate", "adv.lhm.board.voltage.lpc_0_7");
blobs.Should().OnlyContain(static b => b.Hz == 1 && string.Equals(b.Codec, "raw-le-test", StringComparison.Ordinal));
// The rate the session's samples had is the caller's to say (D146); 1 is only what is assumed without it.
AdvancedSessionBuilder.Build(Samples(), _data, new RawSeriesCodec(), hz: 0.758).Blobs
.Should().OnlyContain(static b => b.Hz == 0.758);
float[] pstate = Decode(blobs[0]);
float[] rail = Decode(blobs[1]);
pstate.Should().HaveCount(5);
@@ -118,6 +118,32 @@ public sealed class SessionFinalizerTests
built.Sensors.Should().AllSatisfy(s => s.Hz.Should().Be(1));
}
[Fact]
public void TheRateStoredWithASeriesIsTheOneTheSamplesHad()
{
// D146: it was the constant 1. Samples 1.32 s apart - what a poller that waited its whole interval after its
// work made of "once a second" - are 0.758 a second, and are stored as that.
SessionFinalizer.SampleRate(SessionFixtures.Sensors(3), SessionFixtures.QpcFrequency).Should().Be(1);
List<Application.Telemetry.TelemetrySample> slow = SessionFixtures.Sensors(5);
for (int i = 0; i < slow.Count; i++)
{
slow[i] = slow[i] with { QpcTicks = (long)SessionFixtures.QpcEpoch + (i * SessionFixtures.QpcFrequency * 132 / 100) };
}
SessionFinalizer.SampleRate(slow, SessionFixtures.QpcFrequency).Should().Be(0.758);
(SessionFinalizer finalizer, _) = Make();
FinalizedSession built = finalizer.Build(new FinalizeInput { Skeleton = SessionFixtures.Skeleton(tier: CaptureTier.NotHooked), Sensors = slow });
built.Sensors.Should().NotBeEmpty();
built.Sensors.Should().AllSatisfy(s => s.Hz.Should().Be(0.758));
// Fewer than two samples, or no time between them, have no rate to measure: 1, as before.
SessionFinalizer.SampleRate([], SessionFixtures.QpcFrequency).Should().Be(1);
SessionFinalizer.SampleRate(SessionFixtures.Sensors(1), SessionFixtures.QpcFrequency).Should().Be(1);
SessionFinalizer.SampleRate([slow[0], slow[0]], SessionFixtures.QpcFrequency).Should().Be(1);
SessionFinalizer.SampleRate(slow, 0).Should().Be(1);
}
[Fact]
public void TheMachinesReadingsBecomeTheCpuAndMemorySeriesTheSchemaAlwaysAllowed()
{
@@ -231,6 +231,56 @@ public sealed class TelemetryPollerTests
empty.Should().Throw<ArgumentOutOfRangeException>();
}
[Fact]
public void TheNextTickIsDueAtAWholeIntervalFromTheStartHoweverLongThePollTook()
{
TimeSpan second = TimeSpan.FromSeconds(1);
// D146: a poll that took 320 ms is followed 680 ms later, not a whole second later.
TelemetryPoller.UntilNextTick(TimeSpan.FromMilliseconds(320), second).Should().Be(TimeSpan.FromMilliseconds(680));
TelemetryPoller.UntilNextTick(TimeSpan.FromMilliseconds(5320), second).Should().Be(TimeSpan.FromMilliseconds(680));
// A poll that overran two periods: the next tick still to come, and the two it missed are not made up.
TelemetryPoller.UntilNextTick(TimeSpan.FromMilliseconds(2500), second).Should().Be(TimeSpan.FromMilliseconds(500));
// On the boundary, and before any time has passed: a whole interval - never nothing, never more.
TelemetryPoller.UntilNextTick(second, second).Should().Be(second);
TelemetryPoller.UntilNextTick(TimeSpan.Zero, second).Should().Be(second);
TelemetryPoller.UntilNextTick(TimeSpan.FromSeconds(-3), second).Should().Be(second);
for (int ms = 0; ms < 5000; ms += 37)
{
TelemetryPoller.UntilNextTick(TimeSpan.FromMilliseconds(ms), TimeSpan.FromMilliseconds(500))
.Should().BeGreaterThan(TimeSpan.Zero).And.BeLessThanOrEqualTo(TimeSpan.FromMilliseconds(500));
}
Action none = () => TelemetryPoller.UntilNextTick(second, TimeSpan.Zero);
none.Should().Throw<ArgumentOutOfRangeException>();
}
[Fact]
public void TheThreadKeepsItsPeriodWhenAPollTakesTime()
{
// A layer that takes 300 ms to answer, polled every 500 ms: the samples are 500 ms apart, where waiting the
// whole interval after the work made them 800 ms apart.
using var layer = new FakeLayer(TelemetryLayer.Lhm);
GpuSample sample = layer.Sample(_t0, load: 1);
layer.Script(() =>
{
Thread.Sleep(300);
return sample;
});
var poller = new TelemetryPoller(layer, new TelemetryPollerOptions { Interval = TelemetryPollerOptions.MinimumInterval }, TimeProvider.System);
poller.Start();
SpinWait.SpinUntil(() => poller.Queued >= 7, TimeSpan.FromSeconds(20)).Should().BeTrue("seven ticks, half a second apart");
poller.Dispose();
var samples = new List<TelemetrySample>();
poller.Drain(samples);
double apart = TimeProvider.System.GetElapsedTime(samples[0].QpcTicks, samples[6].QpcTicks).TotalMilliseconds / 6;
apart.Should().BeLessThan(700, "the period is the interval (500 ms), not the interval plus the work (800 ms)");
}
[Fact]
public void TheThreadPollsAtItsIntervalAndReturnsOnDispose()
{