Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 6f4765c641 feat(app): the game's own memory wherever a session is shown - two summary cards, a stored statistics table, Sessions columns, Trend and Compare metrics, two memory charts, the live card, the CSV line (D43, beta.12 PR-3)
- Formats.Memory: Task Manager's units (MB below 1 GB, GB to two decimals, 1 GB = 1024 MB, null is N/A, never 0).
- Services.GameMemoryText: the summary's VRAM (this game) and RAM (this game) cards - the median with the peak and the
  shared / commit peak beneath - the Sessions grid's median · peak cells and tooltips, the live line, the CSV
  `# game_memory:` header line; all from the stored columns and sensor_stats_json. Where Windows reported no private
  working set the working set is shown and says so; an unpinned hold that summed several processes says how many.
- Services.SensorStatsTable + the summary's "Statistics per series": every stored series' mean / median / minimum /
  peak / readings in its own unit; a session recorded before beta.12 gets one sentence instead.
- SensorsChart: two memory plots in GB - Video memory (this game's dedicated and shared, the whole graphics card's)
  and Memory (this game's private working set or labelled working set, the whole PC's). The line that read the
  never-produced per-present vram_proc blob is gone.
- Trend: MaxVramProcess (vram_proc_max_mb, never written, so never a point) becomes Median / Peak VRAM (game) and
  Median / Peak RAM (game) in GB, machine metrics over both tiers; Avg RAM in use is labelled as the whole PC's, in GB.
  Compare gains the four rows, ranking nothing.
- Live card: MemoryText from SessionProgress / SessionHeld (the old VramText read a field nothing produced).
- Strings: 41 new keys, 4 relabelled, 5 dead ones removed, en/vi/ja (ja marked review); 09_I18N glossary rows.
- Tests: GameMemoryTextTests (new), summary, trend, compare, chart, live card, dashboard, export; GamesViewModelTests
  joins the culture collection (it compared resource text across a parallel culture flip and failed once).
- Docs: 08_UI (corrected in place, new beta.12 paragraph), 03_METRICS export schema, CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:22:01 +07:00
36 changed files with 1431 additions and 169 deletions

No files matched your search

+17
View File
@@ -44,6 +44,17 @@ under a `## [x.y.z] - date` heading in the same commit that bumps `VERSION`, the
and through the crash-recovery file (a new chunk type; beta.11's files still recover). The video-memory **budget** is
still not measured (`20_OPEN_QUESTIONS` §M11). The App shows all of it in the next change.
- **Sensor statistics have a median and a minimum** beside the mean and the maximum (`SeriesAggregates`).
- **The App shows the game's own memory everywhere a session is** (D43, beta.12), in Task Manager's units — MB below
1 GB, GB to two decimals, 1 GB = 1024 MB. The **session summary** has two new cards, *VRAM (this game)* and *RAM (this
game)*: the median, with the peak (and the shared GPU memory's or the commit's peak) beneath, and a new table,
**Statistics per series** — every series' mean, median, minimum, peak and number of readings, each in its own unit, as
stored when the session ended. The **Sessions** tab has *VRAM (game)* and *RAM (game)* columns (median · peak, the rest
in the tooltip); the **Trend** has *Median / Peak VRAM (game)* and *Median / Peak RAM (game)*; **Compare** has the same
four rows; the **Sensors** charts draw *Video memory* (this game's dedicated and shared beside the whole graphics card's)
and *Memory* (this game's private working set beside the whole PC's) in GB; the **live card** reads "This game: VRAM …
· RAM …", for a game that is not measured too; and the CSV export has a `# game_memory:` header line. Where Windows does
not report the private working set (before the September 2023 update) the working set is shown in its place and says
so. A session recorded before beta.12 reads N/A, and its summary says the statistics table did not exist yet.
- **`NOTICE`, and the licence header in every source file** (owner decision D45, beta.12). FrameLedger's own material is
GPL-3.0-only with three additional terms of the kinds GPLv3 §7 permits: keep the copyright line and the attribution in
@@ -63,6 +74,12 @@ under a `## [x.y.z] - date` heading in the same commit that bumps `VERSION`, the
### Fixed
- **"Max VRAM (game)" on the Trend never had a point, the live card's VRAM was always empty, and the Sensors chart's
"VRAM used by this game" line was never drawn**: all three read the Overlay's in-game per-present figure, which nothing
ever produced. They read the game's memory measured from outside it now (above), and the CSV's note no longer calls
the always-empty `vram_mb` column "a held 1 Hz sample".
- **"Avg RAM in use" on the Trend is labelled as the whole PC's**, in GB like every other memory figure, so it is not
read as the game's.
- **A licence header written by a contributor no longer has to name poli0981**: `tools/notice-check.ps1` accepts any
holder and year in the same form (`Copyright (C) <year> <holder> - additional terms under GPLv3 section 7: see NOTICE`),
and `CONTRIBUTING.md` says so; seven self-test cases.
+2 -2
View File
@@ -834,7 +834,7 @@ Per-column sources, and what a *Tier-2* export does instead:
| `rt_flags` | `rt_flags` blob, **one byte per frame** preserving all three bits (`asBuildObserved`, `dispatchObserved`, `psoCreatedEver`) — collapsing them to a single "rt-active" bit loses the inline-RayQuery distinction this project exists to measure. The third was `rtPsoAlive` until layout v3 renamed it: creation is observed at `CreateStateObject` and destruction is COM `Release`, which is not in the hook inventory and must not be added, so the bit latches and could only ever mean "created ever" | `N/A` |
| `dispatch_rays` | `dispatch_rays` blob (`uint32[]`, the volume) | `N/A` |
| `pso_created` | `pso_created` blob (`uint16[]`, the **count**, not a flag) | `N/A` |
| `vram_mb` | `vram_proc` per-frame blob. Note the value is refreshed at 1 Hz (`17_HOOK_ENGINE` §Memory) so it is a held sample, not a per-frame measurement — the header block says so | `N/A` |
| `vram_mb` | `vram_proc` per-frame blob. ~~Note the value is refreshed at 1 Hz (`17_HOOK_ENGINE` §Memory) so it is a held sample, not a per-frame measurement — the header block says so~~ **Corrected 2026-10-03: the Overlay never produced it, so the column has always been empty.** It stays in the list — the schema is fixed — and the header's note says so; the game's memory is the `# game_memory:` header line (beta.12, §Game process memory) | `N/A` |
| `reflex_latency_us` | `latency_us` blob; **finalize must write it** | `N/A` |
Plus a `#`-prefixed header block: game, date, **capture tier**, api, present mode, swap effect, **the display line** (beta.10: `# display:` with each mode's milliseconds, the changes, the source and the window / back buffer / monitor sizes, or `N/A` for a session recorded before — §Display mode; a mode is the session's, not a frame's, so it is not a column), hardware snapshot, segment list, the tri-state flags with their sources, and the note that `vram_mb` is 1 Hz-sampled. The tier belongs in the header because a Tier-2 export is missing whole columns and anyone reading it later must know why.
Plus a `#`-prefixed header block: game, date, **capture tier**, api, present mode, swap effect, **the display line** (beta.10: `# display:` with each mode's milliseconds, the changes, the source and the window / back buffer / monitor sizes, or `N/A` for a session recorded before — §Display mode; a mode is the session's, not a frame's, so it is not a column), hardware snapshot, segment list, the tri-state flags with their sources, ~~and the note that `vram_mb` is 1 Hz-sampled~~ **the game's memory** (beta.12: `# game_memory:` with the dedicated GPU memory's mean / median / max, the shared max, the private working set's mean / median / max, the working set's and the commit's max — MiB, invariant — the process count and the sources, or `N/A` for a session recorded before or one where nothing answered; the session's figure, read once a second, so a header line like the display's), and the note that `vram_mb` is the in-game figure this build does not produce. The tier belongs in the header because a Tier-2 export is missing whole columns and anyone reading it later must know why.
+38 -10
View File
@@ -146,7 +146,7 @@ All screens are `Page`s registered with the navigation page provider and navigat
### Dashboard
- Agent status `ui:CardControl` (state, capability badges as `InfoBadge`: telemetry source, Vulkan layer, ~~ETW fallback~~, PawnIO/CPU-temp, elevation — Repair button on error).
- **Live capture card** (visible during capture): game name, **tier badge**, elapsed, live `FpsReadout` (5 s rolling), **measured** `renderW×H → outputW×H` with upscaler + quality, RT-active dot, CPU/GPU temp, per-process VRAM, sparkline (last 120 s) fed by `SessionProgress`. Tier 1 shows measured settings — this is the payoff of hooking and should read as facts, not guesses.
- **Live capture card** (visible during capture): game name, **tier badge**, elapsed, live `FpsReadout` (5 s rolling), **measured** `renderW×H → outputW×H` with upscaler + quality, RT-active dot, CPU/GPU temp, ~~per-process VRAM~~ the game's own VRAM and RAM (beta.12: read from outside the game, so a held session has them too), sparkline (last 120 s) fed by `SessionProgress`. Tier 1 shows measured settings — this is the payoff of hooking and should read as facts, not guesses.
- Recent sessions list (last 10 across games) → click opens session summary.
- Totals strip: games tracked, total playtime, sessions this week (`ui:Card` row).
@@ -154,7 +154,9 @@ All screens are `Page`s registered with the navigation page provider and navigat
> is `LiveCaptureViewModel` over the pipe's `SessionStarted` / `SessionProgress` / `SessionCompleted`
> (marshalled through the captured `SynchronizationContext`): game, tier badge, elapsed, the `FpsReadout` at
> 1 Hz under the display rule (Presented FPS with its census chip until frame generation is measured), the
> measured `renderW×H → outputW×H` with upscaler + quality, the RT chip, GPU/CPU temperature, per-process VRAM.
> measured `renderW×H → outputW×H` with upscaler + quality, the RT chip, GPU/CPU temperature, ~~per-process VRAM~~
> (corrected 2026-10-03: that line read the Overlay's per-present VRAM, which nothing produced, so it was always empty;
> since beta.12 it is "This game: VRAM … · RAM …" from the newest telemetry tick, `GameMemoryText.Live`).
> The sparkline is PR-6's. Recent = `ISessionRepository.ListRecentAsync(10)` with game names; a completed
> session reloads the lists (the row is in SQLite, `07_IPC` §Client behavior). Totals = the library's games,
> `SummariseByGameAsync` playtime, `CountSinceAsync(now − 7 d)`. Capability badges and the Repair button are
@@ -314,7 +316,30 @@ All screens are `Page`s registered with the navigation page provider and navigat
> share %*, *Windowed share %* — over every session whatever its tier, never left out as a mid-session change (a mode
> switch resizes the swap chain, and the share is what that switch was), with no exclusive or borderless point for a
> session that had any time nothing could split (`Services.DisplayText`, `Charts.TrendSeriesBuilder.DisplayShare`).
5. **Sensors** — temp/load/power/VRAM timelines per session; per-process VRAM and adapter-wide VRAM as separate, differently-labelled series.
>
> **The game's own memory, beta.12 (owner decision D43, `03_METRICS` §Game process memory).** Read from outside the game
> once a second in either tier, it is shown wherever a session is (`Services.GameMemoryText`, from the stored columns and
> `sensor_stats_json` — never recomputed). The **Sessions** tab has *VRAM (game)* and *RAM (game)*: the median · the
> peak, in Task Manager's units (MB below 1 GB, GB to two decimals, 1 GB = 1024 MB, `Formats.Memory`), the tooltip
> carrying the mean, the shared GPU memory's peak, the working set's and the commit's peaks, and how many processes were
> added together where an unpinned hold summed more than one. Where Windows did not report the private working set, the
> working set is shown and SAYS so ("(working set)") — never passed off as Task Manager's "Memory". The **Trend** replaces
> *Max VRAM (game)* — which read `vram_proc_max_mb`, a column nothing ever wrote, so it never had a point — with *Median /
> Peak VRAM (game)* and *Median / Peak RAM (game)* in GB, machine metrics that count Tier-2 sessions (the RAM lines are the
> private working set only: a working-set-only session has no point there rather than another quantity on the line);
> *Avg RAM in use* is the whole PC's, now in GB too. **Compare** adds the four as rows that rank nothing — a game that uses
> more of a card it has is not worse. The **Sensors** tab and the summary's Sensors section draw two memory plots in GB:
> *Video memory (VRAM)* — this game's dedicated and shared beside the whole graphics card's — and *Memory (RAM)* — this
> game's private working set (or its working set, labelled) beside the whole PC's; this game is one colour on both. The
> **summary** adds two cards, *VRAM (this game)* and *RAM (this game)* — the median, with "median · peak … · shared …" /
> "… · commit …" beneath — and a table, **Statistics per series**: every stored series' mean, median, minimum, peak and
> number of readings, each in its own unit (`Services.SensorStatsTable`); a session recorded before beta.12 shows one
> sentence instead of the table. The **live card** shows "This game: VRAM … · RAM …" from the newest tick, a held session
> included, and the CSV gains the `# game_memory:` header line. Tests: `GameMemoryTextTests`,
> `SessionSummaryViewModelTests.TheGamesMemoryAndTheStoredStatisticsAreShownForASessionThatWasNotHooked`,
> `TrendSeriesBuilderTests`, `CompareViewModelTests`, `ChartMathTests.TheMemoryPlotFallsBackToTheWorkingSetUnderItsOwnName`,
> `LiveCaptureViewModelTests`, `SessionExporterTests`.
5. **Sensors** — temp/load/power/VRAM timelines per session; per-process VRAM and adapter-wide VRAM as separate, differently-labelled series. Since beta.12 two memory plots in GB: *Video memory (VRAM)* (this game's dedicated and shared, the whole graphics card's) and *Memory (RAM)* (this game's private working set, the whole PC's).
6. **Latency** *(Tier 1 + Reflex only)* — PC latency timeline, avg/p95.
> **Built 2026-09-14 (P3 PR-7): tabs 2–6.** Frametime and Distribution show the session selected in the
@@ -325,9 +350,10 @@ All screens are `Page`s registered with the navigation page provider and navigat
> GPU °C), FR-6.4's exclusion of `settings_changed_midsession` sessions by default with the toggle and the
> excluded count, and FR-6.3's markers — labelled dashed lines wherever two consecutive sessions' hardware
> snapshots differ in GPU driver, GPU, CPU, display mode or OS ("GPU driver: 572.16 → 576.02"). **Sensors**:
> GPU core / hotspot °C, load % and power W (right axis) on one plot; VRAM on another with the game's own
> per-present `vram_proc` (a held 1 Hz sample) and the adapter-wide `vram_adapter` sensor as two
> differently-labelled series. **Latency**: the `latency_us` blob with the stored avg / p95 lines, shown only
> GPU core / hotspot °C, load % and power W (right axis) on one plot; VRAM on another with ~~the game's own
> per-present `vram_proc` (a held 1 Hz sample) and~~ the adapter-wide `vram_adapter` sensor ~~as two
> differently-labelled series~~ (corrected 2026-10-03: the Overlay never produced `vram_proc`, so the game's line was
> never drawn on any session; beta.12's two memory plots are described above). **Latency**: the `latency_us` blob with the stored avg / p95 lines, shown only
> when Reflex reported (`reflex_active`); otherwise the tab says so.
>
> **Trend, corrected 2026-09-25 (beta.8, owner item 6: "does Trend really work?").** It did not, on first open: the
@@ -358,7 +384,7 @@ All screens are `Page`s registered with the navigation page provider and navigat
> PNGs have an opaque background (`ChartTheme.SavePng`: the window's colour under the transparent figure).
### Session summary (secondary `FluentWindow`, also the post-session toast target)
Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutter %, duration, **Display** — beta.10: the mode shown longest with its share and the window's size, both tiers), TriState chips, API/PresentMode/upscaler line, **the display line** (beta.10: every mode's share, the changes, the window on its monitor at its refresh rate, the back buffer and swap effect, and what the facts rested on — "the swap chain said whether it was exclusive" or "from the window alone: exclusive fullscreen cannot be told from borderless"; absent for a session recorded before), crash `InfoBar` (Severity=Error) when `crashed`, frametime chart, sensor strip, tags/notes editor, Export buttons.
Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutter %, duration, **Display** — beta.10: the mode shown longest with its share and the window's size, both tiers; **VRAM (this game)** and **RAM (this game)** — beta.12: the median with the peak beneath, both tiers), **Statistics per series** (beta.12: every stored series' mean / median / minimum / peak), TriState chips, API/PresentMode/upscaler line, **the display line** (beta.10: every mode's share, the changes, the window on its monitor at its refresh rate, the back buffer and swap effect, and what the facts rested on — "the swap chain said whether it was exclusive" or "from the window alone: exclusive fullscreen cannot be told from borderless"; absent for a session recorded before), crash `InfoBar` (Severity=Error) when `crashed`, frametime chart, sensor strip, tags/notes editor, Export buttons.
> **Built 2026-09-14 (P3 PR-6).** `Windows/SessionSummaryWindow` (a secondary `FluentWindow` with its own
> `ContentDialogHost`), opened from a Sessions-tab row (double-click or Open) and from the Dashboard's recent
@@ -403,8 +429,9 @@ Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutte
> beyond a percentile on each side — FR-4.8's rule, generalised — so its 1% and 0.1% lows are marked exactly where
> the stat cards publish them, and the single shortest interval no longer sets the axis; the 0–100 axis holds.
> - **Sensors** (the tab and a new section of the summary window): power on a watt axis at the right, the second
> plot is *Memory* (the game's VRAM, the adapter's, the system's RAM), a per-present VRAM of 0 is a present the sample
> did not reach and is left out, the time axis says where its zero is, and every line has its own colour in both
> plot is *Memory* (the game's VRAM, the adapter's, the system's RAM), ~~a per-present VRAM of 0 is a present the sample
> did not reach and is left out~~ (corrected 2026-10-03: there was no per-present VRAM to draw — the Overlay never
> produced it; beta.12 replaced the plot with two, above), the time axis says where its zero is, and every line has its own colour in both
> themes (the light theme drew power and CPU temperature in one gold). **A session that was not hooked charts its
> sensors** — kept since 2026-09-22, shown nowhere until now.
> - **The game page follows the Agent while it is shown**: a `SessionCompleted` for this game reloads it
@@ -413,7 +440,8 @@ Stat cards (Avg uses `FpsReadout`, Median, 1% Low, 0.1% Low, Min/Max, σ, stutte
> **FR-5.3:** `Charts/Decimator` — every bucket's min and max in order, ≤ 4000 points per series per draw, a
> 500k-point series keeps its spike and its dip (`DecimatorTests`). Zoom and pan are ScottPlot's.
> **FR-9:** `SessionExporter` — the CSV with `03_METRICS` §Export schema's column line verbatim and the `#`
> header block (tier, api, hardware, the tri-states with sources, the segments, the 1 Hz VRAM note),
> header block (tier, api, hardware, the tri-states with sources, the segments, ~~the 1 Hz VRAM note~~ — since beta.12
> the `# game_memory:` line, and a note that `vram_mb` is the in-game figure this build does not produce),
> InvariantCulture throughout, no rows for Tier 2; the JSON (`frameledger-session/1`: metadata, the row as
> aggregates with N/A omitted, segments, the annotation); PNG through `Plot.SavePng`. Tags (comma-separated,
> de-duplicated) and notes save to the annotation row. **FR-3.8** is an in-app notice on `SessionCompleted`
+5
View File
@@ -52,6 +52,11 @@ Languages: **en** (neutral/default) · **vi** · **ja**. Same `.resx` pattern as
| Anti-cheat | Anti-cheat (giữ nguyên) | アンチチート |
| Capture tier | Mức thu thập | 計測ティア |
| Measured / Supports | Đo được / Hỗ trợ | 実測 / 対応 |
| VRAM / RAM (beta.12) | VRAM / RAM (giữ nguyên) | VRAM / RAM |
| Dedicated / Shared GPU memory | Bộ nhớ GPU chuyên dụng / dùng chung | 専用 / 共有 GPU メモリ |
| Private working set / Working set / Commit | giữ nguyên | プライベート ワーキング セット / ワーキング セット / コミット |
| this game / whole graphics card / whole PC | game này / cả card đồ họa / cả máy | このゲーム / グラフィックス カード全体 / PC 全体 |
| Median / Mean / Peak | Trung vị / Trung bình / Đỉnh | 中央値 / 平均 / ピーク |
Technical benchmark vocabulary stays in English across all locales where the community convention is English (1% Low, stutter, present mode, frame pacing).
+4 -1
View File
@@ -7,11 +7,14 @@
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:res="clr-namespace:FrameLedger.App"
xmlns:sp="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF">
<!-- 08_UI §Games › Sensors: temperatures / load / power, and VRAM with per-process and adapter-wide as SEPARATE, differently-labelled series. -->
<!-- 08_UI §Games › Sensors: temperatures / load / power; then video memory and memory, each with THIS GAME's own figure
and the whole graphics card's / whole PC's as SEPARATE, differently-labelled series (beta.12, D43). -->
<StackPanel>
<ui:TextBlock FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Temps_Header}" />
<sp:WpfPlot x:Name="Temps" Height="240" Margin="0,6,0,0" />
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Vram_Header}" />
<sp:WpfPlot x:Name="Vram" Height="220" Margin="0,6,0,0" />
<ui:TextBlock Margin="0,12,0,0" FontTypography="BodyStrong" Text="{x:Static res:Strings.Sensors_Ram_Header}" />
<sp:WpfPlot x:Name="Ram" Height="220" Margin="0,6,0,0" />
</StackPanel>
</UserControl>
+57 -49
View File
@@ -2,17 +2,25 @@
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Windows.Controls;
using FrameLedger.App.Services;
using FrameLedger.Application.Recording;
using ScottPlot;
using ScottPlot.Plottables;
using ScottPlot.WPF;
namespace FrameLedger.App.Charts;
/// <summary>
/// The Sensors tab: GPU core / hotspot temperature, load, CPU temperature and load on one plot (°C and % left) with the GPU's
/// power on a watt axis at the right, and memory on another — the game's own VRAM (the per-present <c>vram_proc</c> blob, a
/// held 1 Hz sample), the adapter-wide VRAM (the <c>vram_adapter</c> sensor) and the system's RAM as differently-labelled
/// series. Since beta.8 it draws a session that was not hooked too: its sensors are all it has.
/// power on a watt axis at the right; then video memory and memory, each with THIS GAME's own figure beside the whole
/// graphics card's or the whole PC's as differently-labelled series, in GB (beta.12, D43: the game's figures are read from
/// outside the game once a second, in either tier). Since beta.8 it draws a session that was not hooked too: its sensors are
/// all it has.
/// </summary>
/// <remarks>
/// Corrected 2026-10-03: the memory plot drew "the game's own VRAM" from the per-present <c>vram_proc</c> blob, which the
/// Overlay never produced — that line was never drawn on any session (<c>20_OPEN_QUESTIONS</c> §H10).
/// </remarks>
public partial class SensorsChart : UserControl
{
/// <summary>The temperatures-and-load plot's series, each with the palette key it is drawn in and whether it is on the watt axis.</summary>
@@ -26,19 +34,32 @@ public partial class SensorsChart : UserControl
("cpu_load", "Chart_Displayed", false),
];
/// <summary>The memory plot's series and their palette keys; <c>vram_proc</c> is the per-present blob, the others sensors.</summary>
internal static readonly IReadOnlyList<(string Series, string PaletteKey)> MemoryPlot =
/// <summary>The video-memory plot's series and their palette keys: this game is in the same colour on both memory plots.</summary>
internal static readonly IReadOnlyList<(string Series, string PaletteKey)> VideoMemoryPlot =
[
("vram_proc", "Chart_Displayed"),
("vram_adapter", "Chart_SensorSecondary"),
("ram_mb", "Chart_Percentile"),
(SensorSeriesCatalog.GameVramDedicated, "Chart_Displayed"),
(SensorSeriesCatalog.GameVramShared, "Chart_Native"),
(SensorSeriesCatalog.VramAdapter, "Chart_SensorSecondary"),
];
/// <summary>
/// The memory plot's series: the game's private working set — or, where this Windows does not report it, its working set,
/// labelled as such (<see cref="SystemMemorySeries"/>) — and the whole PC's memory in use.
/// </summary>
internal static readonly IReadOnlyList<(string Series, string PaletteKey)> SystemMemoryPlot =
[
(SensorSeriesCatalog.GameRamPrivate, "Chart_Displayed"),
(SensorSeriesCatalog.RamSystem, "Chart_Percentile"),
];
private const double _mibPerGb = 1024.0;
public SensorsChart()
{
InitializeComponent();
ChartTheme.Attach(Temps);
ChartTheme.Attach(Vram);
ChartTheme.Attach(Ram);
}
public int DrawnSeries { get; private set; }
@@ -50,7 +71,8 @@ public partial class SensorsChart : UserControl
{
DrawnSeries = 0;
DrawTemps(series);
DrawMemory(series);
DrawMemory(Vram, series, VideoMemoryPlot);
DrawMemory(Ram, series, SystemMemoryPlot);
}
/// <summary>The time axis says where its zero is: the first frame when the sensors sit on the frames' axis, the session's start otherwise.</summary>
@@ -82,64 +104,49 @@ public partial class SensorsChart : UserControl
Temps.Refresh();
}
private void DrawMemory(SessionSeries? series)
/// <summary>One memory plot in GB (MiB stored, 1 GB = 1024 MiB as Task Manager counts it), every line labelled with whose memory it is.</summary>
private void DrawMemory(WpfPlot view, SessionSeries? series, IReadOnlyList<(string Series, string PaletteKey)> lines)
{
ScottPlot.Plot plot = Vram.Plot;
ScottPlot.Plot plot = view.Plot;
plot.Clear();
ChartTheme.Apply(plot);
plot.XLabel(TimeAxisLabel(series));
plot.YLabel(Strings.Sensors_Axis_Mb);
plot.YLabel(Strings.Sensors_Axis_Gb);
if (series is not null)
{
ChartPalette p = ChartTheme.Current;
DrawProcessVram(plot, series, p.ByKey(MemoryPlot[0].PaletteKey));
Line(plot, series, "vram_adapter", Strings.Sensors_Series_VramAdapter, p.ByKey(MemoryPlot[1].PaletteKey), null);
Line(plot, series, "ram_mb", Strings.Sensors_Series_Ram, p.ByKey(MemoryPlot[2].PaletteKey), null);
foreach ((string name, string key) in lines)
{
string shown = SystemMemorySeries(series, name);
Line(plot, series, shown, Label(shown), p.ByKey(key), null, 1.0 / _mibPerGb);
}
plot.Axes.AutoScale();
plot.ShowLegend(Alignment.UpperRight);
}
Vram.Refresh();
view.Refresh();
}
/// <summary>
/// The game's own VRAM, per present on the frames' axis — a 0 is a present the sample did not reach (the record's zero,
/// SessionFinalizer.Series), never a reading, and is left out (beta.8).
/// The game's private working set where it was read, else its working set — labelled as the working set, never as the
/// private one (a Windows before the September 2023 update does not report it). Every other series is itself.
/// </summary>
private void DrawProcessVram(ScottPlot.Plot plot, SessionSeries series, Color color)
internal static string SystemMemorySeries(SessionSeries series, string name)
{
if (series.VramProcMb is not { Length: > 0 } proc)
{
return;
}
int n = Math.Min(proc.Length, series.TimesS.Length);
int[] read = [.. Enumerable.Range(0, n).Where(i => proc[i] > 0)];
if (read.Length == 0)
{
return;
}
(double[] xs, double[] ys) = Decimator.MinMax([.. read.Select(i => series.TimesS[i])], [.. read.Select(i => (double)proc[i])], 1000);
Scatter line = plot.Add.ScatterLine(xs, ys, color);
line.LineWidth = 1;
line.LegendText = Strings.Sensors_Series_VramProcess;
DrawnSeries++;
ArgumentNullException.ThrowIfNull(series);
return string.Equals(name, SensorSeriesCatalog.GameRamPrivate, StringComparison.Ordinal) && !Has(series, name) && Has(series, SensorSeriesCatalog.GameRamWorkingSet)
? SensorSeriesCatalog.GameRamWorkingSet
: name;
}
private static string Label(string series) => series switch
{
"gpu_temp" => Strings.Sensors_Series_GpuTemp,
"gpu_hotspot" => Strings.Sensors_Series_GpuHotspot,
"gpu_load" => Strings.Sensors_Series_GpuLoad,
"gpu_power" => Strings.Sensors_Series_GpuPower,
"cpu_temp" => Strings.Sensors_Series_CpuTemp,
"cpu_load" => Strings.Sensors_Series_CpuLoad,
_ => series,
};
private static bool Has(SessionSeries series, string name) =>
series.Sensors.Any(s => string.Equals(s.Name, name, StringComparison.Ordinal) && s.TimesS.Length > 0);
/// <summary>Draws one sensor series if the session has it; whether it did.</summary>
private bool Line(ScottPlot.Plot plot, SessionSeries series, string name, string label, Color color, IYAxis? axis)
private static string Label(string series) => SensorStatsTable.Label(series);
/// <summary>Draws one sensor series if the session has it, its values times <paramref name="scale"/>; whether it did.</summary>
private bool Line(ScottPlot.Plot plot, SessionSeries series, string name, string label, Color color, IYAxis? axis, double scale = 1.0)
{
SensorSeries? sensor = series.Sensors.FirstOrDefault(s => string.Equals(s.Name, name, StringComparison.Ordinal));
if (sensor is null || sensor.TimesS.Length == 0)
@@ -147,7 +154,8 @@ public partial class SensorsChart : UserControl
return false;
}
(double[] xs, double[] ys) = Decimator.MinMax(sensor.TimesS, sensor.Values, 1000);
double[] values = scale == 1.0 ? sensor.Values : [.. sensor.Values.Select(v => v * scale)];
(double[] xs, double[] ys) = Decimator.MinMax(sensor.TimesS, values, 1000);
Scatter line = plot.Add.ScatterLine(xs, ys, color);
line.LineWidth = 1;
line.LegendText = label;
+16 -3
View File
@@ -25,19 +25,32 @@ public enum TrendMetric
MaxGpuTemp,
/// <summary>The seven below are 2026-09-21's: one game's sessions over time, beyond the frame rate.</summary>
/// <summary>The five below and <see cref="FgFactor"/> are 2026-09-21's: one game's sessions over time, beyond the frame rate.</summary>
AvgGpuLoad,
AvgGpuPower,
MaxVramProcess,
AvgCpuLoad,
MaxCpuTemp,
/// <summary>The whole PC's memory in use, averaged (the machine's, not the game's), in GB since beta.12.</summary>
AvgRam,
/// <summary>
/// The four below are beta.12's (D43): the game process's own memory, read from outside it, both tiers, in GB — its
/// dedicated video memory and its private working set, each as the session's median and peak. They replace
/// <c>MaxVramProcess</c>, which read <c>vram_proc_max_mb</c>: a column nothing ever wrote, so the metric never had a
/// point.
/// </summary>
GameVramMedian,
GameVramPeak,
GameRamMedian,
GameRamPeak,
/// <summary>
/// The counted ×FG factor. A session whose factor is its STEADY STATE's (CLAUDE.md rule 6, 2026-09-17) describes part
/// of the session, so it is treated as a mid-session change: left out by default, drawn marked when those are included.
@@ -54,7 +54,7 @@ public static class TrendSeriesBuilder
TrendMetric.PresentedFps or TrendMetric.NativeFps or TrendMetric.Displayed or TrendMetric.P1Low or TrendMetric.P01Low => Strings.Trend_Unit_Fps,
TrendMetric.MaxGpuTemp or TrendMetric.MaxCpuTemp => Strings.Trend_Unit_Celsius,
TrendMetric.AvgGpuPower => Strings.Trend_Unit_Watts,
TrendMetric.MaxVramProcess or TrendMetric.AvgRam => Strings.Trend_Unit_Megabytes,
TrendMetric.AvgRam or TrendMetric.GameVramMedian or TrendMetric.GameVramPeak or TrendMetric.GameRamMedian or TrendMetric.GameRamPeak => Strings.Trend_Unit_Gigabytes,
TrendMetric.FgFactor => Strings.Trend_Unit_Factor,
_ => Strings.Trend_Unit_Percent,
};
@@ -100,9 +100,13 @@ public static class TrendSeriesBuilder
public static bool IsDisplayMetric(TrendMetric metric) =>
metric is TrendMetric.DisplayExclusiveShare or TrendMetric.DisplayBorderlessShare or TrendMetric.DisplayWindowedShare;
/// <summary>The metrics that are telemetry, recorded by every session whatever its tier.</summary>
/// <summary>
/// The metrics that are telemetry, recorded by every session whatever its tier — the game's own memory among them since
/// beta.12: it is read from outside the game, hooked or not.
/// </summary>
public static bool IsMachineMetric(TrendMetric metric) => metric is TrendMetric.MaxGpuTemp or TrendMetric.AvgGpuLoad or TrendMetric.AvgGpuPower
or TrendMetric.AvgCpuLoad or TrendMetric.MaxCpuTemp or TrendMetric.AvgRam;
or TrendMetric.AvgCpuLoad or TrendMetric.MaxCpuTemp or TrendMetric.AvgRam
or TrendMetric.GameVramMedian or TrendMetric.GameVramPeak or TrendMetric.GameRamMedian or TrendMetric.GameRamPeak;
public static int ExcludedCount(IReadOnlyList<SessionRow> rows, TrendMetric metric)
{
@@ -152,10 +156,16 @@ public static class TrendSeriesBuilder
TrendMetric.MaxGpuTemp => row.MaxGpuTemp,
TrendMetric.AvgGpuLoad => row.AvgGpuLoad,
TrendMetric.AvgGpuPower => row.AvgGpuPowerW,
TrendMetric.MaxVramProcess => row.VramProcMaxMb,
TrendMetric.AvgCpuLoad => row.AvgCpuLoad,
TrendMetric.MaxCpuTemp => row.MaxCpuTemp,
TrendMetric.AvgRam => row.AvgRamMb,
TrendMetric.AvgRam => Gb(row.AvgRamMb),
TrendMetric.GameVramMedian => Gb(row.GameVramDedicatedMedianMb),
TrendMetric.GameVramPeak => Gb(row.GameVramDedicatedMaxMb),
// The private working set only: a session whose Windows reported just the working set has no point here rather
// than a different quantity on the same line (the summary and the Sessions grid show it, labelled).
TrendMetric.GameRamMedian => Gb(row.GameRamPrivateMedianMb),
TrendMetric.GameRamPeak => Gb(row.GameRamPrivateMaxMb),
TrendMetric.FgFactor => readout.Kind == FpsReadoutKind.Generated ? readout.Factor : null,
TrendMetric.DisplayExclusiveShare => DisplayShare(row, DisplayMode.ExclusiveFullscreen),
TrendMetric.DisplayBorderlessShare => DisplayShare(row, DisplayMode.Borderless),
@@ -164,6 +174,9 @@ public static class TrendSeriesBuilder
};
}
/// <summary>MiB as stored, in GB as Task Manager counts them (1 GB = 1024 MiB).</summary>
private static double? Gb(double? mib) => mib / 1024.0;
/// <summary>
/// A mode's share of the session's observed time (0–100), or null: no display facts on the row, no window ever read, or —
/// for exclusive fullscreen and borderless — time the two could not be told apart, which would make either share a guess.
+1 -1
View File
@@ -46,7 +46,7 @@
</Border>
<ui:TextBlock Margin="0,0,16,0" Appearance="Secondary" Text="{Binding ViewModel.Live.GpuTempText}" />
<ui:TextBlock Margin="0,0,16,0" Appearance="Secondary" Text="{Binding ViewModel.Live.CpuTempText}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Live.VramText}" />
<ui:TextBlock Appearance="Secondary" Text="{Binding ViewModel.Live.MemoryText}" />
</WrapPanel>
</StackPanel>
</StackPanel>
@@ -270,6 +270,21 @@
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_P01Low}" Binding="{Binding P01LowText}" />
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_Resolution}" Binding="{Binding ResolutionText}" />
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_GpuTemp}" Binding="{Binding GpuTempText}" />
<!-- beta.12 (D43): the game's own memory, both tiers; mean, the shared / working-set / commit peaks in the tooltip -->
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_GameVram}">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
<TextBlock Text="{Binding GameVramText}" ToolTip="{Binding GameVramTooltip}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_GameRam}">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="{x:Type vm:SessionItemViewModel}">
<TextBlock Text="{Binding GameRamText}" ToolTip="{Binding GameRamTooltip}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header="{x:Static res:Strings.Sessions_Col_Api}" Binding="{Binding ApiText}" />
<!-- beta.10: both tiers; the tooltip carries every share, the window, the back buffer and the source -->
<DataGridTemplateColumn Header="{x:Static res:Strings.Sessions_Col_Display}">
+15
View File
@@ -60,6 +60,21 @@ public static class Formats
/// <summary>A 0–100 load as <c>42%</c>; null → N/A, never 0%.</summary>
public static string Percent(double? value) => value is double v ? v.ToString("0", CultureInfo.CurrentCulture) + "%" : Strings.Common_NotAvailable;
/// <summary>
/// A memory figure stored in MiB, the way Task Manager states it (beta.12): whole MB below 1 GB, GB to two decimals from
/// there, 1 GB = 1024 MB (Windows' own units); null → N/A, never 0. The switch is where the MB figure would round to
/// 1,024 — "1,024 MB" is a GB.
/// </summary>
public static string Memory(double? mib) => mib switch
{
null => Strings.Common_NotAvailable,
>= 1023.5 => string.Format(CultureInfo.CurrentCulture, Strings.Format_Memory_Gb_Format, mib.Value / 1024.0),
_ => string.Format(CultureInfo.CurrentCulture, Strings.Format_Memory_Mb_Format, mib.Value),
};
/// <summary>A GPU's power as <c>215 W</c>; null → N/A.</summary>
public static string Power(double? watts) => watts is double w ? w.ToString("0", CultureInfo.CurrentCulture) + " W" : Strings.Common_NotAvailable;
/// <summary><c>1485×835 → 2560×1440</c>, or one pair when only one is known, or N/A.</summary>
public static string Resolution(int? renderW, int? renderH, int? outputW, int? outputH)
{
@@ -0,0 +1,153 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
namespace FrameLedger.App.Services;
/// <summary>
/// The game process's own memory as the pages state it (beta.12, D43; <c>03_METRICS</c> §Game process memory): the summary's
/// two cards, the Sessions grid's two cells with their tooltips, the live card's line and the CSV header's line — each from
/// the STORED columns and <c>sensor_stats_json</c>, never recomputed (<c>08_UI</c>). Both tiers: the memory is read from
/// outside the game, so a session that was not hooked has it too.
/// </summary>
/// <remarks>
/// <b>The private working set, or the working set labelled.</b> Task Manager's "Memory" is the private working set, which
/// Windows reports only from 10 22H2 / 11 22H2 with the September 2023 update on. Where it is N/A the working set is shown in
/// its place and SAYS so — a different quantity (shared pages included), never passed off as the same one.
/// </remarks>
[SuppressMessage("Performance", "CA1863:Use 'CompositeFormat'", Justification = "the format strings are resources that follow the UI culture, which changes at runtime")]
public static class GameMemoryText
{
/// <summary>The summary's video-memory card: the dedicated median, its peak and the shared peak beneath.</summary>
public static StatCardModel VramCard(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (row.GameVramDedicatedMedianMb is not double median)
{
return new StatCardModel(Strings.Summary_Stat_GameVram, Strings.Common_NotAvailable);
}
string suffix = string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_GameVram_Suffix_Format,
Formats.Memory(row.GameVramDedicatedMaxMb), Formats.Memory(row.GameVramSharedMaxMb));
return new StatCardModel(Strings.Summary_Stat_GameVram, Formats.Memory(median), WithProcesses(suffix, row));
}
/// <summary>The summary's memory card: the private working set's median and peak with the commit peak, or the working set labelled.</summary>
public static StatCardModel RamCard(SessionRow row, IReadOnlyDictionary<string, SensorSeriesStats> stats)
{
ArgumentNullException.ThrowIfNull(row);
ArgumentNullException.ThrowIfNull(stats);
if (row.GameRamPrivateMedianMb is double median)
{
string suffix = string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_GameRam_Suffix_Format,
Formats.Memory(row.GameRamPrivateMaxMb), Formats.Memory(row.GameCommitMaxMb));
return new StatCardModel(Strings.Summary_Stat_GameRam, Formats.Memory(median), WithProcesses(suffix, row));
}
if (WorkingSetMedian(stats) is double ws)
{
string suffix = string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_GameRamWs_Suffix_Format, Formats.Memory(row.GameRamWorkingSetMaxMb));
return new StatCardModel(Strings.Summary_Stat_GameRamWs, Formats.Memory(ws), WithProcesses(suffix, row));
}
return new StatCardModel(Strings.Summary_Stat_GameRam, Strings.Common_NotAvailable);
}
/// <summary>The Sessions grid's video-memory cell: median · peak, or N/A.</summary>
public static string VramCell(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
return Pair(row.GameVramDedicatedMedianMb, row.GameVramDedicatedMaxMb);
}
/// <summary>The grid's video-memory tooltip: mean, median, peak and the shared peak; null when nothing was read.</summary>
public static string? VramTooltip(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (row.GameVramDedicatedMaxMb is null)
{
return null;
}
string text = string.Format(CultureInfo.CurrentCulture, Strings.Sessions_GameVram_Tooltip_Format, Formats.Memory(row.GameVramDedicatedAvgMb),
Formats.Memory(row.GameVramDedicatedMedianMb), Formats.Memory(row.GameVramDedicatedMaxMb), Formats.Memory(row.GameVramSharedMaxMb));
return WithProcesses(text, row, Environment.NewLine);
}
/// <summary>The grid's memory cell: the private working set's median · peak, the working set's labelled, or N/A.</summary>
public static string RamCell(SessionRow row, IReadOnlyDictionary<string, SensorSeriesStats> stats)
{
ArgumentNullException.ThrowIfNull(row);
ArgumentNullException.ThrowIfNull(stats);
if (row.GameRamPrivateMaxMb is not null)
{
return Pair(row.GameRamPrivateMedianMb, row.GameRamPrivateMaxMb);
}
return row.GameRamWorkingSetMaxMb is not null
? string.Format(CultureInfo.CurrentCulture, Strings.Sessions_GameRamWs_Cell_Format, Formats.Memory(WorkingSetMedian(stats)), Formats.Memory(row.GameRamWorkingSetMaxMb))
: Strings.Common_NotAvailable;
}
/// <summary>The grid's memory tooltip; null when nothing was read.</summary>
public static string? RamTooltip(SessionRow row, IReadOnlyDictionary<string, SensorSeriesStats> stats)
{
ArgumentNullException.ThrowIfNull(row);
ArgumentNullException.ThrowIfNull(stats);
string? text = row.GameRamPrivateMaxMb is not null
? string.Format(CultureInfo.CurrentCulture, Strings.Sessions_GameRam_Tooltip_Format, Formats.Memory(row.GameRamPrivateAvgMb), Formats.Memory(row.GameRamPrivateMedianMb),
Formats.Memory(row.GameRamPrivateMaxMb), Formats.Memory(row.GameRamWorkingSetMaxMb), Formats.Memory(row.GameCommitMaxMb))
: row.GameRamWorkingSetMaxMb is not null
? string.Format(CultureInfo.CurrentCulture, Strings.Sessions_GameRamWs_Tooltip_Format, Formats.Memory(WorkingSetMedian(stats)), Formats.Memory(row.GameRamWorkingSetMaxMb))
: null;
return text is null ? null : WithProcesses(text, row, Environment.NewLine);
}
/// <summary>The live card's line from the newest tick (<c>SessionProgress</c> / <c>SessionHeld</c>); empty when neither half was read.</summary>
public static string Live(double? vramMb, double? ramMb) => vramMb is null && ramMb is null
? string.Empty
: string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_GameMemory_Format, Formats.Memory(vramMb), Formats.Memory(ramMb));
/// <summary>
/// The CSV header's <c># game_memory:</c> line (<c>03_METRICS</c> §Export schema): every stored column in MiB, invariant,
/// or <c>N/A</c> for a session recorded before beta.12 or one where nothing answered. A session's figure, not a frame's,
/// so a header line — like <c># display:</c> — and never the per-frame <c>vram_mb</c> column.
/// </summary>
public static string ExportLine(SessionRow row)
{
ArgumentNullException.ThrowIfNull(row);
if (row.GameVramDedicatedMaxMb is null && row.GameRamPrivateMaxMb is null && row.GameRamWorkingSetMaxMb is null && row.GameCommitMaxMb is null)
{
return "N/A";
}
return string.Join("; ",
"vram_dedicated_mb avg=" + Mib(row.GameVramDedicatedAvgMb) + " median=" + Mib(row.GameVramDedicatedMedianMb) + " max=" + Mib(row.GameVramDedicatedMaxMb),
"vram_shared_mb max=" + Mib(row.GameVramSharedMaxMb),
"ram_private_ws_mb avg=" + Mib(row.GameRamPrivateAvgMb) + " median=" + Mib(row.GameRamPrivateMedianMb) + " max=" + Mib(row.GameRamPrivateMaxMb),
"ram_ws_mb max=" + Mib(row.GameRamWorkingSetMaxMb),
"commit_mb max=" + Mib(row.GameCommitMaxMb),
"processes=" + (row.GameMemoryProcesses?.ToString(CultureInfo.InvariantCulture) ?? "N/A"),
"source=" + (row.GameMemorySource ?? "N/A"));
}
/// <summary>The working set's stored median — the one statistic of it with no column of its own.</summary>
private static double? WorkingSetMedian(IReadOnlyDictionary<string, SensorSeriesStats> stats) =>
stats.TryGetValue(SensorSeriesCatalog.GameRamWorkingSet, out SensorSeriesStats? ws) ? ws.Median : null;
private static string Pair(double? median, double? peak) => median is null && peak is null
? Strings.Common_NotAvailable
: Formats.Memory(median) + " · " + Formats.Memory(peak);
/// <summary>An unpinned hold sums every process running the executable; more than one is said wherever the figure is.</summary>
private static string WithProcesses(string text, SessionRow row, string separator = " · ") => row.GameMemoryProcesses is > 1 and int n
? text + separator + string.Format(CultureInfo.CurrentCulture, Strings.GameMemory_Processes_Format, n)
: text;
private static string Mib(double? value) => value is double v ? v.ToString("0.#", CultureInfo.InvariantCulture) : "N/A";
}
@@ -0,0 +1,62 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Recording;
namespace FrameLedger.App.Services;
/// <summary>
/// The summary's statistics table (beta.12; owner request "median, mean"): every series the session stored statistics for,
/// in <see cref="SensorSeriesCatalog"/>'s order, each in its own unit — °C, %, W, or memory as Task Manager states it — with
/// the label its chart line carries, so "this game", "whole graphics card" and "whole PC" read the same in both places.
/// </summary>
public static class SensorStatsTable
{
/// <summary>The rows for one session's stored statistics; empty for a session recorded before beta.12.</summary>
public static IReadOnlyList<SensorStatRowModel> Rows(IReadOnlyDictionary<string, SensorSeriesStats> stats)
{
ArgumentNullException.ThrowIfNull(stats);
var rows = new List<SensorStatRowModel>();
foreach ((string name, _) in SensorSeriesCatalog.All)
{
if (!stats.TryGetValue(name, out SensorSeriesStats? s) || s.N == 0)
{
continue;
}
Func<double?, string> format = FormatOf(name);
rows.Add(new SensorStatRowModel(Label(name), format(s.Mean), format(s.Median), format(s.Min), format(s.Max), s.N.ToString("N0", CultureInfo.CurrentCulture)));
}
return rows;
}
/// <summary>The label a series carries on the Sensors charts and in this table.</summary>
public static string Label(string series) => series switch
{
SensorSeriesCatalog.GpuTemp => Strings.Sensors_Series_GpuTemp,
SensorSeriesCatalog.GpuHotspot => Strings.Sensors_Series_GpuHotspot,
SensorSeriesCatalog.GpuLoad => Strings.Sensors_Series_GpuLoad,
SensorSeriesCatalog.GpuPower => Strings.Sensors_Series_GpuPower,
SensorSeriesCatalog.CpuTemp => Strings.Sensors_Series_CpuTemp,
SensorSeriesCatalog.CpuLoad => Strings.Sensors_Series_CpuLoad,
SensorSeriesCatalog.VramAdapter => Strings.Sensors_Series_VramAdapter,
SensorSeriesCatalog.RamSystem => Strings.Sensors_Series_Ram,
SensorSeriesCatalog.GameVramDedicated => Strings.Sensors_Series_GameVram,
SensorSeriesCatalog.GameVramShared => Strings.Sensors_Series_GameVramShared,
SensorSeriesCatalog.GameRamPrivate => Strings.Sensors_Series_GameRam,
SensorSeriesCatalog.GameRamWorkingSet => Strings.Sensors_Series_GameRamWs,
SensorSeriesCatalog.GameCommit => Strings.Sensors_Series_GameCommit,
_ => series,
};
private static Func<double?, string> FormatOf(string series) => series switch
{
SensorSeriesCatalog.GpuTemp or SensorSeriesCatalog.GpuHotspot or SensorSeriesCatalog.CpuTemp => Formats.Temperature,
SensorSeriesCatalog.GpuLoad or SensorSeriesCatalog.CpuLoad => Formats.Percent,
SensorSeriesCatalog.GpuPower => Formats.Power,
_ => Formats.Memory,
};
}
@@ -114,6 +114,9 @@ public sealed class SessionExporter
// beta.10 (03_METRICS §Display mode): milliseconds per mode, both tiers — a header line, because the per-frame columns
// are 03_METRICS' fixed list and a mode is the session's, not a frame's.
w.WriteLine("# display: " + DisplayText.ExportLine(DisplayText.Of(row)));
// beta.12 (D43, 03_METRICS §Game process memory): the game's own memory, both tiers, MiB — a header line for the same
// reason as the display: it is the session's, read once a second, not a frame's.
w.WriteLine("# game_memory: " + GameMemoryText.ExportLine(row));
w.WriteLine("# hardware: " + (hardware is null ? "N/A" : string.Join("; ", new[] { hardware.CpuName, hardware.GpuName, hardware.GpuDriver, hardware.OsBuild, hardware.DisplayRes }.Where(static s => !string.IsNullOrEmpty(s)))));
w.WriteLine("# rt: " + row.RtFlag + " (" + (row.RtSource ?? "n/a") + "); pt: " + row.PtFlag + " (" + (row.PtSource ?? "n/a") + "); rr: " + row.RrFlag + " (" + (row.RrSource ?? "n/a") + ")");
w.WriteLine("# fg_mode: " + row.FgMode + "; fg_source: " + (row.FgSource ?? "n/a") + "; presented_qualifier: " + (row.PresentedQualifier ?? "n/a"));
@@ -122,7 +125,7 @@ public sealed class SessionExporter
w.WriteLine("# segment: frames " + s.StartFrame.ToString(_inv) + "-" + s.EndFrame.ToString(_inv) + "; " + (s.Upscaler ?? "n/a") + " " + (s.UpscalerQuality ?? string.Empty) + "; " + (s.RenderW?.ToString(_inv) ?? "?") + "x" + (s.RenderH?.ToString(_inv) ?? "?") + " -> " + (s.OutputW?.ToString(_inv) ?? "?") + "x" + (s.OutputH?.ToString(_inv) ?? "?") + "; fg " + (s.FgMode ?? "n/a"));
}
w.WriteLine("# note: vram_mb is a held 1 Hz sample, not a per-frame measurement; qpc_ms is relative to the first present");
w.WriteLine("# note: vram_mb is the in-game per-present figure, which this build does not produce (empty); the game's memory is the game_memory line; qpc_ms is relative to the first present");
w.WriteLine("# note: one swapchain's presents, the stream the statistics are over; qpc_ms closes up every gap (frametime_ms 0)");
}
+121 -13
View File
@@ -137,6 +137,10 @@ public static class Strings
nameof(Compare_Metric_Display),
nameof(Compare_Metric_Displayed),
nameof(Compare_Metric_Duration),
nameof(Compare_Metric_GameRamMedian),
nameof(Compare_Metric_GameRamPeak),
nameof(Compare_Metric_GameVramMedian),
nameof(Compare_Metric_GameVramPeak),
nameof(Compare_Metric_MaxCpuTemp),
nameof(Compare_Metric_MaxGpuTemp),
nameof(Compare_Metric_Median),
@@ -173,12 +177,12 @@ public static class Strings
nameof(Dashboard_Header),
nameof(Dashboard_Live_CpuTemp_Format),
nameof(Dashboard_Live_Elapsed_Format),
nameof(Dashboard_Live_GameMemory_Format),
nameof(Dashboard_Live_GpuTemp_Format),
nameof(Dashboard_Live_Header),
nameof(Dashboard_Live_Idle),
nameof(Dashboard_Live_RecordingOnly),
nameof(Dashboard_Live_Rt_On),
nameof(Dashboard_Live_Vram_Format),
nameof(Dashboard_Live_Waiting),
nameof(Dashboard_Recent_Header),
nameof(Dashboard_SessionDiscarded_Format),
@@ -348,6 +352,8 @@ public static class Strings
nameof(FirstRun_Title),
nameof(Format_Duration_HoursMinutes_Format),
nameof(Format_Duration_MinutesSeconds_Format),
nameof(Format_Memory_Gb_Format),
nameof(Format_Memory_Mb_Format),
nameof(Format_Playtime_Hours_Format),
nameof(Format_Playtime_Minutes_Format),
nameof(Format_Resolution_Format),
@@ -434,6 +440,7 @@ public static class Strings
nameof(GameDetail_Tab_Sensors),
nameof(GameDetail_Tab_Sessions),
nameof(GameDetail_Tab_Trend),
nameof(GameMemory_Processes_Format),
nameof(Games_Add),
nameof(Games_Card_AntiCheat),
nameof(Games_Card_Exception),
@@ -644,20 +651,34 @@ public static class Strings
nameof(Rules_Update_Failed),
nameof(Rules_Update_NoAgent),
nameof(Rules_Update_Title),
nameof(Sensors_Axis_Mb),
nameof(Sensors_Axis_Gb),
nameof(Sensors_Axis_Watts),
nameof(Sensors_Empty),
nameof(Sensors_Ram_Header),
nameof(Sensors_Series_CpuLoad),
nameof(Sensors_Series_CpuTemp),
nameof(Sensors_Series_GameCommit),
nameof(Sensors_Series_GameRam),
nameof(Sensors_Series_GameRamWs),
nameof(Sensors_Series_GameVram),
nameof(Sensors_Series_GameVramShared),
nameof(Sensors_Series_GpuHotspot),
nameof(Sensors_Series_GpuLoad),
nameof(Sensors_Series_GpuPower),
nameof(Sensors_Series_GpuTemp),
nameof(Sensors_Series_Ram),
nameof(Sensors_Series_VramAdapter),
nameof(Sensors_Series_VramProcess),
nameof(Sensors_Temps_Header),
nameof(Sensors_Vram_Header),
nameof(SensorStats_Col_Max),
nameof(SensorStats_Col_Mean),
nameof(SensorStats_Col_Median),
nameof(SensorStats_Col_Min),
nameof(SensorStats_Col_Samples),
nameof(SensorStats_Col_Series),
nameof(SensorStats_Header),
nameof(SensorStats_Note),
nameof(SensorStats_NotStored),
nameof(Session_UnderException_Format),
nameof(Sessions_Col_Api),
nameof(Sessions_Col_Date),
@@ -666,6 +687,8 @@ public static class Strings
nameof(Sessions_Col_Duration),
nameof(Sessions_Col_Exit),
nameof(Sessions_Col_Fg),
nameof(Sessions_Col_GameRam),
nameof(Sessions_Col_GameVram),
nameof(Sessions_Col_GpuTemp),
nameof(Sessions_Col_Native),
nameof(Sessions_Col_P01Low),
@@ -673,6 +696,10 @@ public static class Strings
nameof(Sessions_Col_Resolution),
nameof(Sessions_Col_Tags),
nameof(Sessions_Col_Tier),
nameof(Sessions_GameRam_Tooltip_Format),
nameof(Sessions_GameRamWs_Cell_Format),
nameof(Sessions_GameRamWs_Tooltip_Format),
nameof(Sessions_GameVram_Tooltip_Format),
nameof(Settings_Agent_Elevated),
nameof(Settings_Agent_Elevation_Body),
nameof(Settings_Agent_Elevation_Label),
@@ -802,6 +829,12 @@ public static class Strings
nameof(Summary_Stat_Cpu),
nameof(Summary_Stat_Display),
nameof(Summary_Stat_Duration),
nameof(Summary_Stat_GameRam),
nameof(Summary_Stat_GameRam_Suffix_Format),
nameof(Summary_Stat_GameRamWs),
nameof(Summary_Stat_GameRamWs_Suffix_Format),
nameof(Summary_Stat_GameVram),
nameof(Summary_Stat_GameVram_Suffix_Format),
nameof(Summary_Stat_Gpu),
nameof(Summary_Stat_LoadTemp_Format),
nameof(Summary_Stat_Median),
@@ -877,10 +910,13 @@ public static class Strings
nameof(Trend_Metric_DisplayExclusive),
nameof(Trend_Metric_DisplayWindowed),
nameof(Trend_Metric_FgFactor),
nameof(Trend_Metric_GameRamMedian),
nameof(Trend_Metric_GameRamPeak),
nameof(Trend_Metric_GameVramMedian),
nameof(Trend_Metric_GameVramPeak),
nameof(Trend_Metric_Label),
nameof(Trend_Metric_MaxCpuTemp),
nameof(Trend_Metric_MaxGpuTemp),
nameof(Trend_Metric_MaxVramProcess),
nameof(Trend_Metric_NativeFps),
nameof(Trend_Metric_P01Low),
nameof(Trend_Metric_P1Low),
@@ -889,7 +925,7 @@ public static class Strings
nameof(Trend_Unit_Celsius),
nameof(Trend_Unit_Factor),
nameof(Trend_Unit_Fps),
nameof(Trend_Unit_Megabytes),
nameof(Trend_Unit_Gigabytes),
nameof(Trend_Unit_Percent),
nameof(Trend_Unit_Watts),
nameof(Uninstall_DataFolder_Body),
@@ -1141,6 +1177,14 @@ public static class Strings
public static string Compare_Metric_Duration => ResourceManager.GetString(nameof(Compare_Metric_Duration), Culture) ?? nameof(Compare_Metric_Duration);
public static string Compare_Metric_GameRamMedian => ResourceManager.GetString(nameof(Compare_Metric_GameRamMedian), Culture) ?? nameof(Compare_Metric_GameRamMedian);
public static string Compare_Metric_GameRamPeak => ResourceManager.GetString(nameof(Compare_Metric_GameRamPeak), Culture) ?? nameof(Compare_Metric_GameRamPeak);
public static string Compare_Metric_GameVramMedian => ResourceManager.GetString(nameof(Compare_Metric_GameVramMedian), Culture) ?? nameof(Compare_Metric_GameVramMedian);
public static string Compare_Metric_GameVramPeak => ResourceManager.GetString(nameof(Compare_Metric_GameVramPeak), Culture) ?? nameof(Compare_Metric_GameVramPeak);
public static string Compare_Metric_MaxCpuTemp => ResourceManager.GetString(nameof(Compare_Metric_MaxCpuTemp), Culture) ?? nameof(Compare_Metric_MaxCpuTemp);
public static string Compare_Metric_MaxGpuTemp => ResourceManager.GetString(nameof(Compare_Metric_MaxGpuTemp), Culture) ?? nameof(Compare_Metric_MaxGpuTemp);
@@ -1213,6 +1257,8 @@ public static class Strings
public static string Dashboard_Live_Elapsed_Format => ResourceManager.GetString(nameof(Dashboard_Live_Elapsed_Format), Culture) ?? nameof(Dashboard_Live_Elapsed_Format);
public static string Dashboard_Live_GameMemory_Format => ResourceManager.GetString(nameof(Dashboard_Live_GameMemory_Format), Culture) ?? nameof(Dashboard_Live_GameMemory_Format);
public static string Dashboard_Live_GpuTemp_Format => ResourceManager.GetString(nameof(Dashboard_Live_GpuTemp_Format), Culture) ?? nameof(Dashboard_Live_GpuTemp_Format);
public static string Dashboard_Live_Header => ResourceManager.GetString(nameof(Dashboard_Live_Header), Culture) ?? nameof(Dashboard_Live_Header);
@@ -1223,8 +1269,6 @@ public static class Strings
public static string Dashboard_Live_Rt_On => ResourceManager.GetString(nameof(Dashboard_Live_Rt_On), Culture) ?? nameof(Dashboard_Live_Rt_On);
public static string Dashboard_Live_Vram_Format => ResourceManager.GetString(nameof(Dashboard_Live_Vram_Format), Culture) ?? nameof(Dashboard_Live_Vram_Format);
public static string Dashboard_Live_Waiting => ResourceManager.GetString(nameof(Dashboard_Live_Waiting), Culture) ?? nameof(Dashboard_Live_Waiting);
public static string Dashboard_Recent_Header => ResourceManager.GetString(nameof(Dashboard_Recent_Header), Culture) ?? nameof(Dashboard_Recent_Header);
@@ -1563,6 +1607,10 @@ public static class Strings
public static string Format_Duration_MinutesSeconds_Format => ResourceManager.GetString(nameof(Format_Duration_MinutesSeconds_Format), Culture) ?? nameof(Format_Duration_MinutesSeconds_Format);
public static string Format_Memory_Gb_Format => ResourceManager.GetString(nameof(Format_Memory_Gb_Format), Culture) ?? nameof(Format_Memory_Gb_Format);
public static string Format_Memory_Mb_Format => ResourceManager.GetString(nameof(Format_Memory_Mb_Format), Culture) ?? nameof(Format_Memory_Mb_Format);
public static string Format_Playtime_Hours_Format => ResourceManager.GetString(nameof(Format_Playtime_Hours_Format), Culture) ?? nameof(Format_Playtime_Hours_Format);
public static string Format_Playtime_Minutes_Format => ResourceManager.GetString(nameof(Format_Playtime_Minutes_Format), Culture) ?? nameof(Format_Playtime_Minutes_Format);
@@ -1735,6 +1783,8 @@ public static class Strings
public static string GameDetail_Tab_Trend => ResourceManager.GetString(nameof(GameDetail_Tab_Trend), Culture) ?? nameof(GameDetail_Tab_Trend);
public static string GameMemory_Processes_Format => ResourceManager.GetString(nameof(GameMemory_Processes_Format), Culture) ?? nameof(GameMemory_Processes_Format);
public static string Games_Add => ResourceManager.GetString(nameof(Games_Add), Culture) ?? nameof(Games_Add);
public static string Games_Card_AntiCheat => ResourceManager.GetString(nameof(Games_Card_AntiCheat), Culture) ?? nameof(Games_Card_AntiCheat);
@@ -2155,16 +2205,28 @@ public static class Strings
public static string Rules_Update_Title => ResourceManager.GetString(nameof(Rules_Update_Title), Culture) ?? nameof(Rules_Update_Title);
public static string Sensors_Axis_Mb => ResourceManager.GetString(nameof(Sensors_Axis_Mb), Culture) ?? nameof(Sensors_Axis_Mb);
public static string Sensors_Axis_Gb => ResourceManager.GetString(nameof(Sensors_Axis_Gb), Culture) ?? nameof(Sensors_Axis_Gb);
public static string Sensors_Axis_Watts => ResourceManager.GetString(nameof(Sensors_Axis_Watts), Culture) ?? nameof(Sensors_Axis_Watts);
public static string Sensors_Empty => ResourceManager.GetString(nameof(Sensors_Empty), Culture) ?? nameof(Sensors_Empty);
public static string Sensors_Ram_Header => ResourceManager.GetString(nameof(Sensors_Ram_Header), Culture) ?? nameof(Sensors_Ram_Header);
public static string Sensors_Series_CpuLoad => ResourceManager.GetString(nameof(Sensors_Series_CpuLoad), Culture) ?? nameof(Sensors_Series_CpuLoad);
public static string Sensors_Series_CpuTemp => ResourceManager.GetString(nameof(Sensors_Series_CpuTemp), Culture) ?? nameof(Sensors_Series_CpuTemp);
public static string Sensors_Series_GameCommit => ResourceManager.GetString(nameof(Sensors_Series_GameCommit), Culture) ?? nameof(Sensors_Series_GameCommit);
public static string Sensors_Series_GameRam => ResourceManager.GetString(nameof(Sensors_Series_GameRam), Culture) ?? nameof(Sensors_Series_GameRam);
public static string Sensors_Series_GameRamWs => ResourceManager.GetString(nameof(Sensors_Series_GameRamWs), Culture) ?? nameof(Sensors_Series_GameRamWs);
public static string Sensors_Series_GameVram => ResourceManager.GetString(nameof(Sensors_Series_GameVram), Culture) ?? nameof(Sensors_Series_GameVram);
public static string Sensors_Series_GameVramShared => ResourceManager.GetString(nameof(Sensors_Series_GameVramShared), Culture) ?? nameof(Sensors_Series_GameVramShared);
public static string Sensors_Series_GpuHotspot => ResourceManager.GetString(nameof(Sensors_Series_GpuHotspot), Culture) ?? nameof(Sensors_Series_GpuHotspot);
public static string Sensors_Series_GpuLoad => ResourceManager.GetString(nameof(Sensors_Series_GpuLoad), Culture) ?? nameof(Sensors_Series_GpuLoad);
@@ -2177,12 +2239,28 @@ public static class Strings
public static string Sensors_Series_VramAdapter => ResourceManager.GetString(nameof(Sensors_Series_VramAdapter), Culture) ?? nameof(Sensors_Series_VramAdapter);
public static string Sensors_Series_VramProcess => ResourceManager.GetString(nameof(Sensors_Series_VramProcess), Culture) ?? nameof(Sensors_Series_VramProcess);
public static string Sensors_Temps_Header => ResourceManager.GetString(nameof(Sensors_Temps_Header), Culture) ?? nameof(Sensors_Temps_Header);
public static string Sensors_Vram_Header => ResourceManager.GetString(nameof(Sensors_Vram_Header), Culture) ?? nameof(Sensors_Vram_Header);
public static string SensorStats_Col_Max => ResourceManager.GetString(nameof(SensorStats_Col_Max), Culture) ?? nameof(SensorStats_Col_Max);
public static string SensorStats_Col_Mean => ResourceManager.GetString(nameof(SensorStats_Col_Mean), Culture) ?? nameof(SensorStats_Col_Mean);
public static string SensorStats_Col_Median => ResourceManager.GetString(nameof(SensorStats_Col_Median), Culture) ?? nameof(SensorStats_Col_Median);
public static string SensorStats_Col_Min => ResourceManager.GetString(nameof(SensorStats_Col_Min), Culture) ?? nameof(SensorStats_Col_Min);
public static string SensorStats_Col_Samples => ResourceManager.GetString(nameof(SensorStats_Col_Samples), Culture) ?? nameof(SensorStats_Col_Samples);
public static string SensorStats_Col_Series => ResourceManager.GetString(nameof(SensorStats_Col_Series), Culture) ?? nameof(SensorStats_Col_Series);
public static string SensorStats_Header => ResourceManager.GetString(nameof(SensorStats_Header), Culture) ?? nameof(SensorStats_Header);
public static string SensorStats_Note => ResourceManager.GetString(nameof(SensorStats_Note), Culture) ?? nameof(SensorStats_Note);
public static string SensorStats_NotStored => ResourceManager.GetString(nameof(SensorStats_NotStored), Culture) ?? nameof(SensorStats_NotStored);
public static string Session_UnderException_Format => ResourceManager.GetString(nameof(Session_UnderException_Format), Culture) ?? nameof(Session_UnderException_Format);
public static string Sessions_Col_Api => ResourceManager.GetString(nameof(Sessions_Col_Api), Culture) ?? nameof(Sessions_Col_Api);
@@ -2199,6 +2277,10 @@ public static class Strings
public static string Sessions_Col_Fg => ResourceManager.GetString(nameof(Sessions_Col_Fg), Culture) ?? nameof(Sessions_Col_Fg);
public static string Sessions_Col_GameRam => ResourceManager.GetString(nameof(Sessions_Col_GameRam), Culture) ?? nameof(Sessions_Col_GameRam);
public static string Sessions_Col_GameVram => ResourceManager.GetString(nameof(Sessions_Col_GameVram), Culture) ?? nameof(Sessions_Col_GameVram);
public static string Sessions_Col_GpuTemp => ResourceManager.GetString(nameof(Sessions_Col_GpuTemp), Culture) ?? nameof(Sessions_Col_GpuTemp);
public static string Sessions_Col_Native => ResourceManager.GetString(nameof(Sessions_Col_Native), Culture) ?? nameof(Sessions_Col_Native);
@@ -2213,6 +2295,14 @@ public static class Strings
public static string Sessions_Col_Tier => ResourceManager.GetString(nameof(Sessions_Col_Tier), Culture) ?? nameof(Sessions_Col_Tier);
public static string Sessions_GameRam_Tooltip_Format => ResourceManager.GetString(nameof(Sessions_GameRam_Tooltip_Format), Culture) ?? nameof(Sessions_GameRam_Tooltip_Format);
public static string Sessions_GameRamWs_Cell_Format => ResourceManager.GetString(nameof(Sessions_GameRamWs_Cell_Format), Culture) ?? nameof(Sessions_GameRamWs_Cell_Format);
public static string Sessions_GameRamWs_Tooltip_Format => ResourceManager.GetString(nameof(Sessions_GameRamWs_Tooltip_Format), Culture) ?? nameof(Sessions_GameRamWs_Tooltip_Format);
public static string Sessions_GameVram_Tooltip_Format => ResourceManager.GetString(nameof(Sessions_GameVram_Tooltip_Format), Culture) ?? nameof(Sessions_GameVram_Tooltip_Format);
public static string Settings_Agent_Elevated => ResourceManager.GetString(nameof(Settings_Agent_Elevated), Culture) ?? nameof(Settings_Agent_Elevated);
public static string Settings_Agent_Elevation_Body => ResourceManager.GetString(nameof(Settings_Agent_Elevation_Body), Culture) ?? nameof(Settings_Agent_Elevation_Body);
@@ -2471,6 +2561,18 @@ public static class Strings
public static string Summary_Stat_Duration => ResourceManager.GetString(nameof(Summary_Stat_Duration), Culture) ?? nameof(Summary_Stat_Duration);
public static string Summary_Stat_GameRam => ResourceManager.GetString(nameof(Summary_Stat_GameRam), Culture) ?? nameof(Summary_Stat_GameRam);
public static string Summary_Stat_GameRam_Suffix_Format => ResourceManager.GetString(nameof(Summary_Stat_GameRam_Suffix_Format), Culture) ?? nameof(Summary_Stat_GameRam_Suffix_Format);
public static string Summary_Stat_GameRamWs => ResourceManager.GetString(nameof(Summary_Stat_GameRamWs), Culture) ?? nameof(Summary_Stat_GameRamWs);
public static string Summary_Stat_GameRamWs_Suffix_Format => ResourceManager.GetString(nameof(Summary_Stat_GameRamWs_Suffix_Format), Culture) ?? nameof(Summary_Stat_GameRamWs_Suffix_Format);
public static string Summary_Stat_GameVram => ResourceManager.GetString(nameof(Summary_Stat_GameVram), Culture) ?? nameof(Summary_Stat_GameVram);
public static string Summary_Stat_GameVram_Suffix_Format => ResourceManager.GetString(nameof(Summary_Stat_GameVram_Suffix_Format), Culture) ?? nameof(Summary_Stat_GameVram_Suffix_Format);
public static string Summary_Stat_Gpu => ResourceManager.GetString(nameof(Summary_Stat_Gpu), Culture) ?? nameof(Summary_Stat_Gpu);
public static string Summary_Stat_LoadTemp_Format => ResourceManager.GetString(nameof(Summary_Stat_LoadTemp_Format), Culture) ?? nameof(Summary_Stat_LoadTemp_Format);
@@ -2621,14 +2723,20 @@ public static class Strings
public static string Trend_Metric_FgFactor => ResourceManager.GetString(nameof(Trend_Metric_FgFactor), Culture) ?? nameof(Trend_Metric_FgFactor);
public static string Trend_Metric_GameRamMedian => ResourceManager.GetString(nameof(Trend_Metric_GameRamMedian), Culture) ?? nameof(Trend_Metric_GameRamMedian);
public static string Trend_Metric_GameRamPeak => ResourceManager.GetString(nameof(Trend_Metric_GameRamPeak), Culture) ?? nameof(Trend_Metric_GameRamPeak);
public static string Trend_Metric_GameVramMedian => ResourceManager.GetString(nameof(Trend_Metric_GameVramMedian), Culture) ?? nameof(Trend_Metric_GameVramMedian);
public static string Trend_Metric_GameVramPeak => ResourceManager.GetString(nameof(Trend_Metric_GameVramPeak), Culture) ?? nameof(Trend_Metric_GameVramPeak);
public static string Trend_Metric_Label => ResourceManager.GetString(nameof(Trend_Metric_Label), Culture) ?? nameof(Trend_Metric_Label);
public static string Trend_Metric_MaxCpuTemp => ResourceManager.GetString(nameof(Trend_Metric_MaxCpuTemp), Culture) ?? nameof(Trend_Metric_MaxCpuTemp);
public static string Trend_Metric_MaxGpuTemp => ResourceManager.GetString(nameof(Trend_Metric_MaxGpuTemp), Culture) ?? nameof(Trend_Metric_MaxGpuTemp);
public static string Trend_Metric_MaxVramProcess => ResourceManager.GetString(nameof(Trend_Metric_MaxVramProcess), Culture) ?? nameof(Trend_Metric_MaxVramProcess);
public static string Trend_Metric_NativeFps => ResourceManager.GetString(nameof(Trend_Metric_NativeFps), Culture) ?? nameof(Trend_Metric_NativeFps);
public static string Trend_Metric_P01Low => ResourceManager.GetString(nameof(Trend_Metric_P01Low), Culture) ?? nameof(Trend_Metric_P01Low);
@@ -2645,7 +2753,7 @@ public static class Strings
public static string Trend_Unit_Fps => ResourceManager.GetString(nameof(Trend_Unit_Fps), Culture) ?? nameof(Trend_Unit_Fps);
public static string Trend_Unit_Megabytes => ResourceManager.GetString(nameof(Trend_Unit_Megabytes), Culture) ?? nameof(Trend_Unit_Megabytes);
public static string Trend_Unit_Gigabytes => ResourceManager.GetString(nameof(Trend_Unit_Gigabytes), Culture) ?? nameof(Trend_Unit_Gigabytes);
public static string Trend_Unit_Percent => ResourceManager.GetString(nameof(Trend_Unit_Percent), Culture) ?? nameof(Trend_Unit_Percent);
+168 -24
View File
@@ -517,10 +517,6 @@
<value>RT 有効</value>
<comment>review</comment>
</data>
<data name="Dashboard_Live_Vram_Format" xml:space="preserve">
<value>{0} MB VRAM (プロセス)</value>
<comment>review</comment>
</data>
<data name="Dashboard_Live_Waiting" xml:space="preserve">
<value>接続済み — 最初のフレームを待機中…</value>
<comment>review</comment>
@@ -1645,10 +1641,6 @@
<value>平均 {0:0.0} ms · p95 {1:0.0} ms</value>
<comment>review</comment>
</data>
<data name="Sensors_Axis_Mb" xml:space="preserve">
<value>MB</value>
<comment>review</comment>
</data>
<data name="Sensors_Empty" xml:space="preserve">
<value>このセッションにはセンサー系列が記録されていません。</value>
<comment>review</comment>
@@ -1670,11 +1662,7 @@
<comment>review</comment>
</data>
<data name="Sensors_Series_VramAdapter" xml:space="preserve">
<value>アダプター全体の VRAM 使用量 (MB)</value>
<comment>review</comment>
</data>
<data name="Sensors_Series_VramProcess" xml:space="preserve">
<value>このゲームの VRAM 使用量 (MB)</value>
<value>VRAM・グラフィックス カード全体</value>
<comment>review</comment>
</data>
<data name="Sensors_Temps_Header" xml:space="preserve">
@@ -1682,7 +1670,7 @@
<comment>review</comment>
</data>
<data name="Sensors_Vram_Header" xml:space="preserve">
<value>メモリ</value>
<value>ビデオ メモリ(VRAM)</value>
<comment>review</comment>
</data>
<data name="Tabs_SelectASession" xml:space="preserve">
@@ -1777,10 +1765,6 @@
<value>W</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Megabytes" xml:space="preserve">
<value>MB</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Factor" xml:space="preserve">
<value>×(フレーム生成)</value>
<comment>review</comment>
@@ -2668,10 +2652,6 @@
<value>平均GPU電力 W</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_MaxVramProcess" xml:space="preserve">
<value>最大VRAM(ゲーム)MB</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_AvgCpuLoad" xml:space="preserve">
<value>平均CPU負荷 %</value>
<comment>review</comment>
@@ -2681,7 +2661,7 @@
<comment>review</comment>
</data>
<data name="Trend_Metric_AvgRam" xml:space="preserve">
<value>平均メモリ使用量 MB</value>
<value>平均 RAM 使用量(PC 全体)GB</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_FgFactor" xml:space="preserve">
@@ -2709,7 +2689,7 @@
<comment>review</comment>
</data>
<data name="Sensors_Series_Ram" xml:space="preserve">
<value>メモリ使用量(システム)</value>
<value>使用中の RAM・PC 全体</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_AvgGpuLoad" xml:space="preserve">
@@ -3609,4 +3589,168 @@
<value>{0} のユーザーモード例外のもとでフック</value>
<comment>review</comment>
</data>
<data name="Format_Memory_Mb_Format" xml:space="preserve">
<value>{0:N0} MB</value>
<comment>review</comment>
</data>
<data name="Format_Memory_Gb_Format" xml:space="preserve">
<value>{0:N2} GB</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_GameVram" xml:space="preserve">
<value>VRAM(このゲーム)</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_GameRam" xml:space="preserve">
<value>RAM(このゲーム)</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_GameRamWs" xml:space="preserve">
<value>RAM(このゲーム・ワーキング セット)</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_GameVram_Suffix_Format" xml:space="preserve">
<value>中央値 · ピーク {0} · 共有 {1}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_GameRam_Suffix_Format" xml:space="preserve">
<value>中央値 · ピーク {0} · コミット {1}</value>
<comment>review</comment>
</data>
<data name="Summary_Stat_GameRamWs_Suffix_Format" xml:space="preserve">
<value>中央値 · ピーク {0} · この Windows はプライベート ワーキング セットを報告しません</value>
<comment>review</comment>
</data>
<data name="GameMemory_Processes_Format" xml:space="preserve">
<value>ゲームの実行ファイルを実行している {0} 個のプロセスの合計</value>
<comment>review</comment>
</data>
<data name="SensorStats_Header" xml:space="preserve">
<value>系列ごとの統計</value>
<comment>review</comment>
</data>
<data name="SensorStats_Note" xml:space="preserve">
<value>セッション中に 1 秒ごとに読み取り、終了時に保存した値です。「このゲーム」はゲーム自身のプロセスで、ゲームの外から読み取っています。「グラフィックス カード全体」と「PC 全体」には、そのとき実行中だった他のすべてが含まれます。</value>
<comment>review</comment>
</data>
<data name="SensorStats_NotStored" xml:space="preserve">
<value>系列ごとの統計(平均・中央値・最小・ピーク)は、0.1.0-beta.12 以降で記録したセッションに保存されます。</value>
<comment>review</comment>
</data>
<data name="SensorStats_Col_Series" xml:space="preserve">
<value>系列</value>
<comment>review</comment>
</data>
<data name="SensorStats_Col_Mean" xml:space="preserve">
<value>平均</value>
<comment>review</comment>
</data>
<data name="SensorStats_Col_Median" xml:space="preserve">
<value>中央値</value>
<comment>review</comment>
</data>
<data name="SensorStats_Col_Min" xml:space="preserve">
<value>最小</value>
<comment>review</comment>
</data>
<data name="SensorStats_Col_Max" xml:space="preserve">
<value>ピーク</value>
<comment>review</comment>
</data>
<data name="SensorStats_Col_Samples" xml:space="preserve">
<value>読み取り回数</value>
<comment>review</comment>
</data>
<data name="Sensors_Series_GameVram" xml:space="preserve">
<value>VRAM・このゲーム(専用)</value>
<comment>review</comment>
</data>
<data name="Sensors_Series_GameVramShared" xml:space="preserve">
<value>共有 GPU メモリ・このゲーム</value>
<comment>review</comment>
</data>
<data name="Sensors_Series_GameRam" xml:space="preserve">
<value>RAM・このゲーム(プライベート ワーキング セット)</value>
<comment>review</comment>
</data>
<data name="Sensors_Series_GameRamWs" xml:space="preserve">
<value>ワーキング セット・このゲーム</value>
<comment>review</comment>
</data>
<data name="Sensors_Series_GameCommit" xml:space="preserve">
<value>コミット・このゲーム</value>
<comment>review</comment>
</data>
<data name="Sensors_Ram_Header" xml:space="preserve">
<value>メモリ(RAM)</value>
<comment>review</comment>
</data>
<data name="Sensors_Axis_Gb" xml:space="preserve">
<value>GB</value>
<comment>review</comment>
</data>
<data name="Sessions_Col_GameVram" xml:space="preserve">
<value>VRAM(ゲーム)中央値 · ピーク</value>
<comment>review</comment>
</data>
<data name="Sessions_Col_GameRam" xml:space="preserve">
<value>RAM(ゲーム)中央値 · ピーク</value>
<comment>review</comment>
</data>
<data name="Sessions_GameRamWs_Cell_Format" xml:space="preserve">
<value>{0} · {1}(ワーキング セット)</value>
<comment>review</comment>
</data>
<data name="Sessions_GameVram_Tooltip_Format" xml:space="preserve">
<value>専用 GPU メモリ(タスク マネージャーと同じ数え方)— 平均 {0} · 中央値 {1} · ピーク {2}。共有 GPU メモリのピーク {3}。</value>
<comment>review</comment>
</data>
<data name="Sessions_GameRam_Tooltip_Format" xml:space="preserve">
<value>プライベート ワーキング セット(タスク マネージャーの「メモリ」)— 平均 {0} · 中央値 {1} · ピーク {2}。ワーキング セットのピーク {3} · コミットのピーク {4}。</value>
<comment>review</comment>
</data>
<data name="Sessions_GameRamWs_Tooltip_Format" xml:space="preserve">
<value>この Windows はプライベート ワーキング セットを報告しないため、ワーキング セット(共有ページを含む)を表示しています — 中央値 {0} · ピーク {1}。</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_GameVramMedian" xml:space="preserve">
<value>VRAM(ゲーム)中央値 GB</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_GameVramPeak" xml:space="preserve">
<value>VRAM(ゲーム)ピーク GB</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_GameRamMedian" xml:space="preserve">
<value>RAM(ゲーム)中央値 GB</value>
<comment>review</comment>
</data>
<data name="Trend_Metric_GameRamPeak" xml:space="preserve">
<value>RAM(ゲーム)ピーク GB</value>
<comment>review</comment>
</data>
<data name="Trend_Unit_Gigabytes" xml:space="preserve">
<value>GB</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_GameVramMedian" xml:space="preserve">
<value>VRAM(ゲーム)中央値</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_GameVramPeak" xml:space="preserve">
<value>VRAM(ゲーム)ピーク</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_GameRamMedian" xml:space="preserve">
<value>RAM(ゲーム)中央値</value>
<comment>review</comment>
</data>
<data name="Compare_Metric_GameRamPeak" xml:space="preserve">
<value>RAM(ゲーム)ピーク</value>
<comment>review</comment>
</data>
<data name="Dashboard_Live_GameMemory_Format" xml:space="preserve">
<value>このゲーム: VRAM {0} · RAM {1}</value>
<comment>review</comment>
</data>
</root>
+127 -19
View File
@@ -393,9 +393,6 @@
<data name="Dashboard_Live_Rt_On" xml:space="preserve">
<value>RT active</value>
</data>
<data name="Dashboard_Live_Vram_Format" xml:space="preserve">
<value>{0} MB VRAM (process)</value>
</data>
<data name="Dashboard_Live_Waiting" xml:space="preserve">
<value>Attached — waiting for the first frames…</value>
</data>
@@ -1239,9 +1236,6 @@
<data name="Latency_Stats_Format" xml:space="preserve">
<value>avg {0:0.0} ms · p95 {1:0.0} ms</value>
</data>
<data name="Sensors_Axis_Mb" xml:space="preserve">
<value>MB</value>
</data>
<data name="Sensors_Empty" xml:space="preserve">
<value>No sensor series were recorded for this session.</value>
</data>
@@ -1258,16 +1252,13 @@
<value>GPU core °C</value>
</data>
<data name="Sensors_Series_VramAdapter" xml:space="preserve">
<value>VRAM used on the adapter (MB)</value>
</data>
<data name="Sensors_Series_VramProcess" xml:space="preserve">
<value>VRAM used by this game (MB)</value>
<value>VRAM, whole graphics card</value>
</data>
<data name="Sensors_Temps_Header" xml:space="preserve">
<value>Temperatures, load and power</value>
</data>
<data name="Sensors_Vram_Header" xml:space="preserve">
<value>Memory</value>
<value>Video memory (VRAM)</value>
</data>
<data name="Tabs_SelectASession" xml:space="preserve">
<value>Select a session in the Sessions tab to see it here.</value>
@@ -1338,9 +1329,6 @@
<data name="Trend_Unit_Watts" xml:space="preserve">
<value>W</value>
</data>
<data name="Trend_Unit_Megabytes" xml:space="preserve">
<value>MB</value>
</data>
<data name="Trend_Unit_Factor" xml:space="preserve">
<value>× (frame generation)</value>
</data>
@@ -2010,9 +1998,6 @@ Open the log folder?</value>
<data name="Trend_Metric_AvgGpuPower" xml:space="preserve">
<value>Avg GPU power W</value>
</data>
<data name="Trend_Metric_MaxVramProcess" xml:space="preserve">
<value>Max VRAM (game) MB</value>
</data>
<data name="Trend_Metric_AvgCpuLoad" xml:space="preserve">
<value>Avg CPU load %</value>
</data>
@@ -2020,7 +2005,7 @@ Open the log folder?</value>
<value>Max CPU °C</value>
</data>
<data name="Trend_Metric_AvgRam" xml:space="preserve">
<value>Avg RAM in use MB</value>
<value>Avg RAM in use (whole PC) GB</value>
</data>
<data name="Trend_Metric_FgFactor" xml:space="preserve">
<value>FG factor ×</value>
@@ -2041,7 +2026,7 @@ Open the log folder?</value>
<value>CPU load %</value>
</data>
<data name="Sensors_Series_Ram" xml:space="preserve">
<value>RAM in use (system)</value>
<value>RAM in use, whole PC</value>
</data>
<data name="Compare_Metric_AvgGpuLoad" xml:space="preserve">
<value>Avg GPU load</value>
@@ -2717,4 +2702,127 @@ The documents below are the full terms; this summary does not replace them.</val
<data name="Session_UnderException_Format" xml:space="preserve">
<value>Hooked under the user-mode exception for {0}</value>
</data>
<data name="Format_Memory_Mb_Format" xml:space="preserve">
<value>{0:N0} MB</value>
</data>
<data name="Format_Memory_Gb_Format" xml:space="preserve">
<value>{0:N2} GB</value>
</data>
<data name="Summary_Stat_GameVram" xml:space="preserve">
<value>VRAM (this game)</value>
</data>
<data name="Summary_Stat_GameRam" xml:space="preserve">
<value>RAM (this game)</value>
</data>
<data name="Summary_Stat_GameRamWs" xml:space="preserve">
<value>RAM (this game, working set)</value>
</data>
<data name="Summary_Stat_GameVram_Suffix_Format" xml:space="preserve">
<value>median · peak {0} · shared {1}</value>
</data>
<data name="Summary_Stat_GameRam_Suffix_Format" xml:space="preserve">
<value>median · peak {0} · commit {1}</value>
</data>
<data name="Summary_Stat_GameRamWs_Suffix_Format" xml:space="preserve">
<value>median · peak {0} · this Windows does not report the private working set</value>
</data>
<data name="GameMemory_Processes_Format" xml:space="preserve">
<value>{0} processes running the game's executable, added together</value>
</data>
<data name="SensorStats_Header" xml:space="preserve">
<value>Statistics per series</value>
</data>
<data name="SensorStats_Note" xml:space="preserve">
<value>Read once a second during the session and stored when it ended. "This game" is the game's own process, read from outside it; "whole graphics card" and "whole PC" include everything else that was running.</value>
</data>
<data name="SensorStats_NotStored" xml:space="preserve">
<value>Statistics per series (mean, median, minimum, peak) are stored for sessions recorded with 0.1.0-beta.12 or later.</value>
</data>
<data name="SensorStats_Col_Series" xml:space="preserve">
<value>Series</value>
</data>
<data name="SensorStats_Col_Mean" xml:space="preserve">
<value>Mean</value>
</data>
<data name="SensorStats_Col_Median" xml:space="preserve">
<value>Median</value>
</data>
<data name="SensorStats_Col_Min" xml:space="preserve">
<value>Minimum</value>
</data>
<data name="SensorStats_Col_Max" xml:space="preserve">
<value>Peak</value>
</data>
<data name="SensorStats_Col_Samples" xml:space="preserve">
<value>Readings</value>
</data>
<data name="Sensors_Series_GameVram" xml:space="preserve">
<value>VRAM, this game (dedicated)</value>
</data>
<data name="Sensors_Series_GameVramShared" xml:space="preserve">
<value>Shared GPU memory, this game</value>
</data>
<data name="Sensors_Series_GameRam" xml:space="preserve">
<value>RAM, this game (private working set)</value>
</data>
<data name="Sensors_Series_GameRamWs" xml:space="preserve">
<value>Working set, this game</value>
</data>
<data name="Sensors_Series_GameCommit" xml:space="preserve">
<value>Commit, this game</value>
</data>
<data name="Sensors_Ram_Header" xml:space="preserve">
<value>Memory (RAM)</value>
</data>
<data name="Sensors_Axis_Gb" xml:space="preserve">
<value>GB</value>
</data>
<data name="Sessions_Col_GameVram" xml:space="preserve">
<value>VRAM (game) median · peak</value>
</data>
<data name="Sessions_Col_GameRam" xml:space="preserve">
<value>RAM (game) median · peak</value>
</data>
<data name="Sessions_GameRamWs_Cell_Format" xml:space="preserve">
<value>{0} · {1} (working set)</value>
</data>
<data name="Sessions_GameVram_Tooltip_Format" xml:space="preserve">
<value>Dedicated GPU memory, as Task Manager counts it — mean {0} · median {1} · peak {2}. Shared GPU memory, peak {3}.</value>
</data>
<data name="Sessions_GameRam_Tooltip_Format" xml:space="preserve">
<value>Private working set (Task Manager's "Memory") — mean {0} · median {1} · peak {2}. Working set, peak {3} · commit, peak {4}.</value>
</data>
<data name="Sessions_GameRamWs_Tooltip_Format" xml:space="preserve">
<value>This Windows does not report the private working set, so this is the working set (shared pages included) — median {0} · peak {1}.</value>
</data>
<data name="Trend_Metric_GameVramMedian" xml:space="preserve">
<value>Median VRAM (game) GB</value>
</data>
<data name="Trend_Metric_GameVramPeak" xml:space="preserve">
<value>Peak VRAM (game) GB</value>
</data>
<data name="Trend_Metric_GameRamMedian" xml:space="preserve">
<value>Median RAM (game) GB</value>
</data>
<data name="Trend_Metric_GameRamPeak" xml:space="preserve">
<value>Peak RAM (game) GB</value>
</data>
<data name="Trend_Unit_Gigabytes" xml:space="preserve">
<value>GB</value>
</data>
<data name="Compare_Metric_GameVramMedian" xml:space="preserve">
<value>Median VRAM (game)</value>
</data>
<data name="Compare_Metric_GameVramPeak" xml:space="preserve">
<value>Peak VRAM (game)</value>
</data>
<data name="Compare_Metric_GameRamMedian" xml:space="preserve">
<value>Median RAM (game)</value>
</data>
<data name="Compare_Metric_GameRamPeak" xml:space="preserve">
<value>Peak RAM (game)</value>
</data>
<data name="Dashboard_Live_GameMemory_Format" xml:space="preserve">
<value>This game: VRAM {0} · RAM {1}</value>
</data>
</root>
+127 -19
View File
@@ -388,9 +388,6 @@
<data name="Dashboard_Live_Rt_On" xml:space="preserve">
<value>RT đang bật</value>
</data>
<data name="Dashboard_Live_Vram_Format" xml:space="preserve">
<value>{0} MB VRAM (tiến trình)</value>
</data>
<data name="Dashboard_Live_Waiting" xml:space="preserve">
<value>Đã gắn — chờ các khung hình đầu tiên…</value>
</data>
@@ -1234,9 +1231,6 @@
<data name="Latency_Stats_Format" xml:space="preserve">
<value>TB {0:0.0} ms · p95 {1:0.0} ms</value>
</data>
<data name="Sensors_Axis_Mb" xml:space="preserve">
<value>MB</value>
</data>
<data name="Sensors_Empty" xml:space="preserve">
<value>Phiên này không ghi chuỗi cảm biến nào.</value>
</data>
@@ -1253,16 +1247,13 @@
<value>GPU lõi °C</value>
</data>
<data name="Sensors_Series_VramAdapter" xml:space="preserve">
<value>VRAM toàn card (MB)</value>
</data>
<data name="Sensors_Series_VramProcess" xml:space="preserve">
<value>VRAM game này dùng (MB)</value>
<value>VRAM, cả card đồ họa</value>
</data>
<data name="Sensors_Temps_Header" xml:space="preserve">
<value>Nhiệt độ, tải và công suất</value>
</data>
<data name="Sensors_Vram_Header" xml:space="preserve">
<value>Bộ nhớ</value>
<value>Bộ nhớ video (VRAM)</value>
</data>
<data name="Tabs_SelectASession" xml:space="preserve">
<value>Chọn một phiên ở thẻ Phiên chơi để xem tại đây.</value>
@@ -1333,9 +1324,6 @@
<data name="Trend_Unit_Watts" xml:space="preserve">
<value>W</value>
</data>
<data name="Trend_Unit_Megabytes" xml:space="preserve">
<value>MB</value>
</data>
<data name="Trend_Unit_Factor" xml:space="preserve">
<value>× (frame generation)</value>
</data>
@@ -2005,9 +1993,6 @@ Mở thư mục log?</value>
<data name="Trend_Metric_AvgGpuPower" xml:space="preserve">
<value>Công suất GPU TB (W)</value>
</data>
<data name="Trend_Metric_MaxVramProcess" xml:space="preserve">
<value>VRAM tối đa (game) MB</value>
</data>
<data name="Trend_Metric_AvgCpuLoad" xml:space="preserve">
<value>Tải CPU TB %</value>
</data>
@@ -2015,7 +2000,7 @@ Mở thư mục log?</value>
<value>CPU °C tối đa</value>
</data>
<data name="Trend_Metric_AvgRam" xml:space="preserve">
<value>RAM đang dùng TB (MB)</value>
<value>RAM đang dùng trung bình (cả máy) GB</value>
</data>
<data name="Trend_Metric_FgFactor" xml:space="preserve">
<value>Hệ số FG ×</value>
@@ -2036,7 +2021,7 @@ Mở thư mục log?</value>
<value>Tải CPU %</value>
</data>
<data name="Sensors_Series_Ram" xml:space="preserve">
<value>RAM đang dùng (hệ thống)</value>
<value>RAM đang dùng, cả máy</value>
</data>
<data name="Compare_Metric_AvgGpuLoad" xml:space="preserve">
<value>Tải GPU TB</value>
@@ -2712,4 +2697,127 @@ Các tài liệu bên dưới là điều khoản đầy đủ; phần tóm tắ
<data name="Session_UnderException_Format" xml:space="preserve">
<value>Được hook dưới ngoại lệ user-mode cho {0}</value>
</data>
<data name="Format_Memory_Mb_Format" xml:space="preserve">
<value>{0:N0} MB</value>
</data>
<data name="Format_Memory_Gb_Format" xml:space="preserve">
<value>{0:N2} GB</value>
</data>
<data name="Summary_Stat_GameVram" xml:space="preserve">
<value>VRAM (game này)</value>
</data>
<data name="Summary_Stat_GameRam" xml:space="preserve">
<value>RAM (game này)</value>
</data>
<data name="Summary_Stat_GameRamWs" xml:space="preserve">
<value>RAM (game này, working set)</value>
</data>
<data name="Summary_Stat_GameVram_Suffix_Format" xml:space="preserve">
<value>trung vị · đỉnh {0} · dùng chung {1}</value>
</data>
<data name="Summary_Stat_GameRam_Suffix_Format" xml:space="preserve">
<value>trung vị · đỉnh {0} · commit {1}</value>
</data>
<data name="Summary_Stat_GameRamWs_Suffix_Format" xml:space="preserve">
<value>trung vị · đỉnh {0} · Windows này không báo private working set</value>
</data>
<data name="GameMemory_Processes_Format" xml:space="preserve">
<value>cộng {0} tiến trình đang chạy tệp exe của game</value>
</data>
<data name="SensorStats_Header" xml:space="preserve">
<value>Thống kê theo từng chuỗi số liệu</value>
</data>
<data name="SensorStats_Note" xml:space="preserve">
<value>Đọc mỗi giây một lần trong phiên chơi và lưu khi phiên kết thúc. "Game này" là tiến trình của chính game, đọc từ bên ngoài game; "cả card đồ họa" và "cả máy" gồm mọi thứ khác đang chạy lúc đó.</value>
</data>
<data name="SensorStats_NotStored" xml:space="preserve">
<value>Thống kê theo từng chuỗi (trung bình, trung vị, nhỏ nhất, đỉnh) được lưu cho các phiên ghi bằng 0.1.0-beta.12 trở lên.</value>
</data>
<data name="SensorStats_Col_Series" xml:space="preserve">
<value>Chuỗi số liệu</value>
</data>
<data name="SensorStats_Col_Mean" xml:space="preserve">
<value>Trung bình</value>
</data>
<data name="SensorStats_Col_Median" xml:space="preserve">
<value>Trung vị</value>
</data>
<data name="SensorStats_Col_Min" xml:space="preserve">
<value>Nhỏ nhất</value>
</data>
<data name="SensorStats_Col_Max" xml:space="preserve">
<value>Đỉnh</value>
</data>
<data name="SensorStats_Col_Samples" xml:space="preserve">
<value>Số lần đọc</value>
</data>
<data name="Sensors_Series_GameVram" xml:space="preserve">
<value>VRAM, game này (chuyên dụng)</value>
</data>
<data name="Sensors_Series_GameVramShared" xml:space="preserve">
<value>Bộ nhớ GPU dùng chung, game này</value>
</data>
<data name="Sensors_Series_GameRam" xml:space="preserve">
<value>RAM, game này (private working set)</value>
</data>
<data name="Sensors_Series_GameRamWs" xml:space="preserve">
<value>Working set, game này</value>
</data>
<data name="Sensors_Series_GameCommit" xml:space="preserve">
<value>Commit, game này</value>
</data>
<data name="Sensors_Ram_Header" xml:space="preserve">
<value>Bộ nhớ (RAM)</value>
</data>
<data name="Sensors_Axis_Gb" xml:space="preserve">
<value>GB</value>
</data>
<data name="Sessions_Col_GameVram" xml:space="preserve">
<value>VRAM (game) trung vị · đỉnh</value>
</data>
<data name="Sessions_Col_GameRam" xml:space="preserve">
<value>RAM (game) trung vị · đỉnh</value>
</data>
<data name="Sessions_GameRamWs_Cell_Format" xml:space="preserve">
<value>{0} · {1} (working set)</value>
</data>
<data name="Sessions_GameVram_Tooltip_Format" xml:space="preserve">
<value>Bộ nhớ GPU chuyên dụng, như Task Manager tính — trung bình {0} · trung vị {1} · đỉnh {2}. Bộ nhớ GPU dùng chung, đỉnh {3}.</value>
</data>
<data name="Sessions_GameRam_Tooltip_Format" xml:space="preserve">
<value>Private working set (cột "Bộ nhớ" của Task Manager) — trung bình {0} · trung vị {1} · đỉnh {2}. Working set, đỉnh {3} · commit, đỉnh {4}.</value>
</data>
<data name="Sessions_GameRamWs_Tooltip_Format" xml:space="preserve">
<value>Windows này không báo private working set, nên đây là working set (gồm cả các trang dùng chung) — trung vị {0} · đỉnh {1}.</value>
</data>
<data name="Trend_Metric_GameVramMedian" xml:space="preserve">
<value>VRAM (game) trung vị GB</value>
</data>
<data name="Trend_Metric_GameVramPeak" xml:space="preserve">
<value>VRAM (game) đỉnh GB</value>
</data>
<data name="Trend_Metric_GameRamMedian" xml:space="preserve">
<value>RAM (game) trung vị GB</value>
</data>
<data name="Trend_Metric_GameRamPeak" xml:space="preserve">
<value>RAM (game) đỉnh GB</value>
</data>
<data name="Trend_Unit_Gigabytes" xml:space="preserve">
<value>GB</value>
</data>
<data name="Compare_Metric_GameVramMedian" xml:space="preserve">
<value>VRAM (game) trung vị</value>
</data>
<data name="Compare_Metric_GameVramPeak" xml:space="preserve">
<value>VRAM (game) đỉnh</value>
</data>
<data name="Compare_Metric_GameRamMedian" xml:space="preserve">
<value>RAM (game) trung vị</value>
</data>
<data name="Compare_Metric_GameRamPeak" xml:space="preserve">
<value>RAM (game) đỉnh</value>
</data>
<data name="Dashboard_Live_GameMemory_Format" xml:space="preserve">
<value>Game này: VRAM {0} · RAM {1}</value>
</data>
</root>
@@ -195,6 +195,13 @@ public sealed partial class CompareViewModel : ObservableObject
Rows.Add(Row(Strings.Compare_Metric_AvgGpuLoad, rows, static r => r.AvgGpuLoad, Formats.Percent, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_AvgCpuLoad, rows, static r => r.AvgCpuLoad, Formats.Percent, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_MaxCpuTemp, rows, static r => r.MaxCpuTemp, Formats.Temperature, higherIsBetter: false));
// beta.12 (D43), both tiers: the game's own memory. Facts, not scores — a game that uses more of a card it has is not
// worse — so no row names a best. The private working set only, as on the Trend.
Rows.Add(Row(Strings.Compare_Metric_GameVramMedian, rows, static r => r.GameVramDedicatedMedianMb, Formats.Memory, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_GameVramPeak, rows, static r => r.GameVramDedicatedMaxMb, Formats.Memory, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_GameRamMedian, rows, static r => r.GameRamPrivateMedianMb, Formats.Memory, higherIsBetter: null));
Rows.Add(Row(Strings.Compare_Metric_GameRamPeak, rows, static r => r.GameRamPrivateMaxMb, Formats.Memory, higherIsBetter: null));
Rows.Add(new CompareRowViewModel(Strings.Compare_Metric_Duration, [.. rows.Select(static r => new CompareCell(Formats.Duration(r.DurationSeconds), false))]));
// beta.10: how each session was shown, both tiers. Facts, not scores: no mode is better than another, so none is best.
@@ -333,9 +333,12 @@ public sealed partial class GameDetailViewModel : ObservableObject
new(TrendMetric.MaxGpuTemp, Strings.Trend_Metric_MaxGpuTemp),
new(TrendMetric.AvgGpuLoad, Strings.Trend_Metric_AvgGpuLoad),
new(TrendMetric.AvgGpuPower, Strings.Trend_Metric_AvgGpuPower),
new(TrendMetric.MaxVramProcess, Strings.Trend_Metric_MaxVramProcess),
new(TrendMetric.AvgCpuLoad, Strings.Trend_Metric_AvgCpuLoad),
new(TrendMetric.MaxCpuTemp, Strings.Trend_Metric_MaxCpuTemp),
new(TrendMetric.GameVramMedian, Strings.Trend_Metric_GameVramMedian),
new(TrendMetric.GameVramPeak, Strings.Trend_Metric_GameVramPeak),
new(TrendMetric.GameRamMedian, Strings.Trend_Metric_GameRamMedian),
new(TrendMetric.GameRamPeak, Strings.Trend_Metric_GameRamPeak),
new(TrendMetric.AvgRam, Strings.Trend_Metric_AvgRam),
new(TrendMetric.FgFactor, Strings.Trend_Metric_FgFactor),
new(TrendMetric.DisplayExclusiveShare, Strings.Trend_Metric_DisplayExclusive),
@@ -521,7 +524,7 @@ public sealed partial class GameDetailViewModel : ObservableObject
}
SelectedHasSeries = SelectedSeries is not null;
SelectedHasSensors = SelectedSensors is { } shown && (shown.Sensors.Count > 0 || shown.VramProcMb is { Length: > 0 });
SelectedHasSensors = SelectedSensors is { Sensors.Count: > 0 };
SensorsNote = session is null ? Strings.Tabs_SelectASession
: SelectedHasSensors ? string.Empty
: session.IsHooked && SelectedSeries is null ? Strings.Tabs_SelectedNoFrames
@@ -69,8 +69,12 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
[ObservableProperty]
private string _cpuTempText = string.Empty;
/// <summary>
/// The game's own video memory and private working set from the newest tick (beta.12, D43) — both tiers, read from outside
/// the game. It read the Overlay's per-present VRAM, which nothing produced, so it was always empty.
/// </summary>
[ObservableProperty]
private string _vramText = string.Empty;
private string _memoryText = string.Empty;
public Guid? SessionGuid { get; private set; }
@@ -98,7 +102,7 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
Show(session.SessionGuid, session.GameName, session.Tier, session.Hold);
}
/// <summary>A held session's 1 Hz tick: elapsed and the machine's temperatures.</summary>
/// <summary>A held session's 1 Hz tick: elapsed, the machine's temperatures and the game's own memory.</summary>
public void Hold(SessionHeldEvent held)
{
ArgumentNullException.ThrowIfNull(held);
@@ -110,6 +114,7 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
ElapsedText = string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_Elapsed_Format, Formats.Duration(held.ElapsedS));
GpuTempText = held.GpuTempC is double g ? string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_GpuTemp_Format, Math.Round(g)) : string.Empty;
CpuTempText = held.CpuTempC is double c ? string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_CpuTemp_Format, Math.Round(c)) : string.Empty;
MemoryText = GameMemoryText.Live(held.GameVramDedicatedMb, held.GameRamPrivateMb);
}
private void Show(Guid sessionGuid, string? gameName, int tier, SessionHold? hold)
@@ -126,7 +131,7 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
TierText = tier == 1 ? Strings.Tier_Hooked : Strings.Tier_NotHooked;
ElapsedText = string.Empty;
Readout = FpsReadoutModel.Unavailable;
ResolutionText = UpscalerText = FgText = GpuTempText = CpuTempText = VramText = string.Empty;
ResolutionText = UpscalerText = FgText = GpuTempText = CpuTempText = MemoryText = string.Empty;
RtActive = false;
// Held means the Agent said why (a Tier-2 start carries its hold). A session the status lists at tier 2 with no hold
@@ -161,7 +166,7 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
RtActive = progress.RtActive == true;
GpuTempText = progress.GpuTempC is double g ? string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_GpuTemp_Format, Math.Round(g)) : string.Empty;
CpuTempText = progress.CpuTempC is double c ? string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_CpuTemp_Format, Math.Round(c)) : string.Empty;
VramText = progress.VramProcMb is int v ? string.Format(CultureInfo.CurrentCulture, Strings.Dashboard_Live_Vram_Format, v) : string.Empty;
MemoryText = GameMemoryText.Live(progress.GameVramDedicatedMb, progress.GameRamPrivateMb);
}
public void Stop(SessionCompletedEvent completed)
@@ -177,6 +182,6 @@ public sealed partial class LiveCaptureViewModel : ObservableObject
IsActive = false;
WaitingForFrames = false;
IsHeld = false;
HeldReason = GameName = TierText = ElapsedText = GpuTempText = CpuTempText = VramText = string.Empty;
HeldReason = GameName = TierText = ElapsedText = GpuTempText = CpuTempText = MemoryText = string.Empty;
}
}
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
namespace FrameLedger.App.ViewModels;
/// <summary>
/// One row of the summary's statistics table (beta.12): a series' stored mean, median, minimum and peak as text in its own
/// unit, and how many readings they are over — from <c>sessions.sensor_stats_json</c>, never recomputed.
/// </summary>
public sealed record SensorStatRowModel(string Series, string Mean, string Median, string Min, string Max, string Readings);
@@ -40,6 +40,12 @@ public sealed class SessionItemViewModel
P01LowText = IsHooked ? Formats.Fps(row.P01LowFps) : Strings.Common_NotAvailable;
ResolutionText = IsHooked ? Formats.Resolution(row.RenderW, row.RenderH, row.OutputW, row.OutputH) + " · " + Formats.Upscaler(row.Upscaler, row.UpscalerQuality, row.UpscalerDriverReported) : Strings.Common_NotAvailable;
GpuTempText = Formats.Temperature(row.MaxGpuTemp);
// beta.12 (D43), both tiers: the game's own memory, median · peak, the rest in the tooltip.
IReadOnlyDictionary<string, Application.Recording.SensorSeriesStats> stats = Application.Recording.SensorSeriesStats.Parse(row.SensorStatsJson);
GameVramText = GameMemoryText.VramCell(row);
GameVramTooltip = GameMemoryText.VramTooltip(row);
GameRamText = GameMemoryText.RamCell(row, stats);
GameRamTooltip = GameMemoryText.RamTooltip(row, stats);
// beta.10: both tiers — the window is read out of process whether or not the game was hooked.
Domain.Display.DisplaySummary? display = DisplayText.Of(row);
DisplayModeText = DisplayText.Headline(display);
@@ -83,6 +89,16 @@ public sealed class SessionItemViewModel
public string GpuTempText { get; }
/// <summary>The game's dedicated video memory, median · peak; N/A for a session recorded before beta.12.</summary>
public string GameVramText { get; }
public string? GameVramTooltip { get; }
/// <summary>The game's private working set, median · peak — or its working set, labelled; N/A before beta.12.</summary>
public string GameRamText { get; }
public string? GameRamTooltip { get; }
/// <summary>The mode the session was shown in longest, with its share; N/A for a row recorded before beta.10.</summary>
public string DisplayModeText { get; }
@@ -119,6 +119,17 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
[ObservableProperty]
private bool _showSensors;
/// <summary>beta.12: the session stored per-series statistics (<c>sensor_stats_json</c>), so the table is shown.</summary>
[ObservableProperty]
private bool _hasSensorStats;
/// <summary>
/// Why there is no table for a session that has sensors (beta.12): it was recorded before the statistics were stored. Null
/// when the table is shown, or when the session recorded no sensor at all — nothing is missing then.
/// </summary>
[ObservableProperty]
private string? _sensorStatsMissing;
[ObservableProperty]
private string _tags = string.Empty;
@@ -159,6 +170,22 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
public static string SensorsHeader => Strings.GameDetail_Tab_Sensors;
public static string SensorStatsHeader => Strings.SensorStats_Header;
public static string SensorStatsNote => Strings.SensorStats_Note;
public static string SensorStatsSeriesHeader => Strings.SensorStats_Col_Series;
public static string SensorStatsMeanHeader => Strings.SensorStats_Col_Mean;
public static string SensorStatsMedianHeader => Strings.SensorStats_Col_Median;
public static string SensorStatsMinHeader => Strings.SensorStats_Col_Min;
public static string SensorStatsMaxHeader => Strings.SensorStats_Col_Max;
public static string SensorStatsReadingsHeader => Strings.SensorStats_Col_Samples;
public static string ShowDisplayedText => Strings.Summary_Show_Displayed;
public static string ShowSensorsText => Strings.Summary_Show_Sensors;
@@ -188,6 +215,9 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
public ObservableCollection<StatCardModel> Stats { get; } = [];
/// <summary>beta.12: every series' stored mean, median, minimum and peak (<see cref="SensorStatsTable"/>).</summary>
public ObservableCollection<SensorStatRowModel> SensorStats { get; } = [];
public ObservableCollection<TriStateChipModel> Chips { get; } = [];
/// <summary>The action in flight, for a test to await.</summary>
@@ -353,7 +383,7 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
Notes = _annotation?.Notes ?? string.Empty;
HasDisplayed = Series?.HasGenerated == true;
HasSensors = Series is { SensorsAligned: true, Sensors.Count: > 0 };
HasSensorCharts = SensorSeries is { } shown && (shown.Sensors.Count > 0 || shown.VramProcMb is { Length: > 0 });
HasSensorCharts = SensorSeries is { Sensors.Count: > 0 };
DecimationNote = Series is null ? string.Empty : string.Format(CultureInfo.CurrentCulture, Strings.Chart_Decimated_Format, Series.Presents, Math.Min(Series.Presents, Decimator.DefaultBuckets * 2));
PresentStats(row);
PresentChips();
@@ -362,6 +392,7 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
private void PresentStats(SessionRow row)
{
IReadOnlyDictionary<string, Application.Recording.SensorSeriesStats> stats = Application.Recording.SensorSeriesStats.Parse(row.SensorStatsJson);
string? presented = IsHooked && FpsPresentation.FromRow(row).Kind == FpsReadoutKind.Presented ? Strings.Summary_Lows_Presented : null;
Stats.Clear();
Stats.Add(new StatCardModel(Strings.Summary_Stat_Avg, Readout.Line));
@@ -383,6 +414,20 @@ public sealed partial class SessionSummaryViewModel : ObservableObject
// The machine, both tiers: telemetry is what a not-hooked session still has. Load is the average, temperature the peak.
Stats.Add(new StatCardModel(Strings.Summary_Stat_Gpu, string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_LoadTemp_Format, Formats.Percent(row.AvgGpuLoad), Formats.Temperature(row.MaxGpuTemp))));
Stats.Add(new StatCardModel(Strings.Summary_Stat_Cpu, string.Format(CultureInfo.CurrentCulture, Strings.Summary_Stat_LoadTemp_Format, Formats.Percent(row.AvgCpuLoad), Formats.Temperature(row.MaxCpuTemp))));
// beta.12 (D43), both tiers: the game's own memory, read from outside it — the median, with the peak beneath.
Stats.Add(GameMemoryText.VramCard(row));
Stats.Add(GameMemoryText.RamCard(row, stats));
// The table reads what finalize stored; a session from before beta.12 says so rather than computing it here.
SensorStats.Clear();
foreach (SensorStatRowModel line in SensorStatsTable.Rows(stats))
{
SensorStats.Add(line);
}
HasSensorStats = SensorStats.Count > 0;
SensorStatsMissing = !HasSensorStats && (HasSensorCharts || row.AvgGpuLoad is not null || row.MaxGpuTemp is not null) ? Strings.SensorStats_NotStored : null;
}
/// <summary>
@@ -123,6 +123,56 @@
<charts:SensorsChart x:Name="Sensors" Margin="0,6,0,0" />
</StackPanel>
<!-- beta.12: every series' STORED mean / median / minimum / peak (sensor_stats_json), never recomputed. An
ItemsControl over a shared-size grid rather than a DataGrid: a DataGrid's own scroller would take the
window's wheel. -->
<StackPanel Visibility="{Binding ViewModel.HasSensorStats, Converter={StaticResource BoolToVis}}">
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsHeader}" />
<ui:TextBlock Appearance="Tertiary" TextWrapping="Wrap" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsNote}" />
<StackPanel Margin="0,6,0,0" Grid.IsSharedSizeScope="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="StatSeries" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatMean" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatMedian" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatMin" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatMax" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatReadings" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" Margin="0,0,24,4" FontTypography="BodyStrong" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsSeriesHeader}" />
<ui:TextBlock Grid.Column="1" Margin="0,0,24,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsMeanHeader}" />
<ui:TextBlock Grid.Column="2" Margin="0,0,24,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsMedianHeader}" />
<ui:TextBlock Grid.Column="3" Margin="0,0,24,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsMinHeader}" />
<ui:TextBlock Grid.Column="4" Margin="0,0,24,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsMaxHeader}" />
<ui:TextBlock Grid.Column="5" Margin="0,0,0,4" FontTypography="BodyStrong" TextAlignment="Right" Text="{x:Static vm:SessionSummaryViewModel.SensorStatsReadingsHeader}" />
</Grid>
<ItemsControl ItemsSource="{Binding ViewModel.SensorStats}" Focusable="False">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type vm:SensorStatRowModel}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="StatSeries" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatMean" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatMedian" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatMin" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatMax" />
<ColumnDefinition Width="Auto" SharedSizeGroup="StatReadings" />
</Grid.ColumnDefinitions>
<ui:TextBlock Grid.Column="0" Margin="0,2,24,2" Text="{Binding Series}" />
<ui:TextBlock Grid.Column="1" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Mean}" />
<ui:TextBlock Grid.Column="2" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Median}" />
<ui:TextBlock Grid.Column="3" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Min}" />
<ui:TextBlock Grid.Column="4" Margin="0,2,24,2" TextAlignment="Right" Text="{Binding Max}" />
<ui:TextBlock Grid.Column="5" Margin="0,2,0,2" Appearance="Secondary" TextAlignment="Right" Text="{Binding Readings}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</StackPanel>
<ui:TextBlock Margin="0,8,0,0" Appearance="Tertiary" TextWrapping="Wrap" Text="{Binding ViewModel.SensorStatsMissing}"
Visibility="{Binding ViewModel.SensorStatsMissing, Converter={StaticResource NullToCollapsed}}" />
<!-- annotations -->
<ui:TextBlock Margin="0,16,0,0" FontTypography="Subtitle" Text="{x:Static vm:SessionSummaryViewModel.AnnotationsHeader}" />
<ui:TextBox Margin="0,6,0,0" AutomationProperties.Name="{x:Static vm:SessionSummaryViewModel.TagsPlaceholder}" PlaceholderText="{x:Static vm:SessionSummaryViewModel.TagsPlaceholder}" Text="{Binding ViewModel.Tags, UpdateSourceTrigger=PropertyChanged}" />
+18 -1
View File
@@ -107,7 +107,7 @@ public sealed class ChartMathTests
{
Dictionary<string, (int R, int G, int B)> palette = Palette(file);
foreach (string[] plot in new[] { SensorsChart.TempsPlot.Select(static s => s.PaletteKey).ToArray(), SensorsChart.MemoryPlot.Select(static s => s.PaletteKey).ToArray() })
foreach (string[] plot in new[] { SensorsChart.TempsPlot.Select(static s => s.PaletteKey).ToArray(), SensorsChart.VideoMemoryPlot.Select(static s => s.PaletteKey).ToArray(), SensorsChart.SystemMemoryPlot.Select(static s => s.PaletteKey).ToArray() })
{
for (int i = 0; i < plot.Length; i++)
{
@@ -119,6 +119,23 @@ public sealed class ChartMathTests
}
}
/// <summary>
/// beta.12: the memory plot draws the game's private working set, and where this Windows reported none, its working set —
/// under the working set's own label (the series name picks it), never as the private one.
/// </summary>
[Fact]
public void TheMemoryPlotFallsBackToTheWorkingSetUnderItsOwnName()
{
SessionSeries both = SessionSeries.SensorsOnly([new SensorSeries("game_ram_private", [0, 1], [3000, 3100]), new SensorSeries("game_ram_ws", [0, 1], [4000, 4100])]);
SessionSeries wsOnly = SessionSeries.SensorsOnly([new SensorSeries("game_ram_ws", [0, 1], [4000, 4100])]);
SessionSeries none = SessionSeries.SensorsOnly([new SensorSeries("ram_mb", [0, 1], [20000, 20100])]);
SensorsChart.SystemMemorySeries(both, "game_ram_private").Should().Be("game_ram_private");
SensorsChart.SystemMemorySeries(wsOnly, "game_ram_private").Should().Be("game_ram_ws");
SensorsChart.SystemMemorySeries(none, "game_ram_private").Should().Be("game_ram_private", "nothing to fall back to: the line is simply not drawn");
SensorsChart.SystemMemorySeries(wsOnly, "ram_mb").Should().Be("ram_mb");
}
private static readonly XNamespace _x = "http://schemas.microsoft.com/winfx/2006/xaml";
private static readonly XNamespace _p = "http://schemas.microsoft.com/winfx/2006/xaml/presentation";
@@ -95,7 +95,8 @@ public sealed class CompareViewModelTests
GameRow a = await s.GameAsync("Alpha");
await s.SessionWithFramesAsync(a.Id, DateTimeOffset.UtcNow.AddHours(-3), frames: 300, spikeEvery: 0);
await s.SessionWithFramesAsync(a.Id, DateTimeOffset.UtcNow.AddHours(-2), frames: 300, spikeEvery: 50);
await s.SessionAsync(a.Id, DateTimeOffset.UtcNow.AddHours(-1), hooked: false);
await s.SessionAsync(a.Id, DateTimeOffset.UtcNow.AddHours(-1), hooked: false,
shape: static r => r with { GameVramDedicatedMedianMb = 2048, GameVramDedicatedMaxMb = 3072, GameRamPrivateMedianMb = 1024, GameRamPrivateMaxMb = 1536 });
var mixed = new ScriptedMixed(answer: true);
CompareViewModel vm = await BuildAsync(s, mixed);
foreach (CompareCandidateViewModel c in vm.Candidates)
@@ -124,6 +125,13 @@ public sealed class CompareViewModelTests
CompareRowViewModel native = vm.Rows.Single(r => string.Equals(r.Metric, "Native FPS", StringComparison.Ordinal));
native.Cells.Skip(1).Should().OnlyContain(static c => c.Text == "60");
// beta.12: the game's memory is every session's — the Tier-2 one has it — and a fact, not a score: none is best.
CompareRowViewModel vramPeak = vm.Rows.Single(r => string.Equals(r.Metric, "Peak VRAM (game)", StringComparison.Ordinal));
vramPeak.Cells[0].Text.Should().Be(Formats.Memory(3072));
vramPeak.Cells.Skip(1).Should().OnlyContain(static c => c.Text == "N/A", "recorded without the game's memory");
vramPeak.Cells.Should().OnlyContain(static c => !c.IsBest);
vm.Rows.Single(r => string.Equals(r.Metric, "Median RAM (game)", StringComparison.Ordinal)).Cells[0].Text.Should().Be(Formats.Memory(1024));
// beta.10: the display rows are facts, not scores — none is best, and a row recorded before says N/A.
foreach (string metric in new[] { "Display mode", "Window", "Monitor" })
{
@@ -140,14 +140,15 @@ public sealed class DashboardViewModelTests
OutputH = 1440,
RtActive = true,
GpuTempC = 70.6,
VramProcMb = 4100,
GameVramDedicatedMb = 4100,
GameRamPrivateMb = 2048,
});
vm.Live.WaitingForFrames.Should().BeFalse();
vm.Live.Readout.Kind.Should().Be(FpsReadoutKind.Presented);
vm.Live.UpscalerText.Should().Be("DLSS Quality");
vm.Live.RtActive.Should().BeTrue();
vm.Live.GpuTempText.Should().Contain("71");
vm.Live.VramText.Should().Contain("4100");
vm.Live.MemoryText.Should().Be(GameMemoryText.Live(4100, 2048), "the game's own memory from the newest tick (beta.12)");
// A progress for another session is ignored; the completion of ours ends the card and reloads the lists.
link.Raise(IpcMessageType.SessionProgress, new SessionProgressEvent { SessionGuid = Guid.NewGuid(), ElapsedS = 1, Presents5s = 10, PresentedQualifier = "census_not_run", FgMode = "na", RtActive = false });
@@ -0,0 +1,200 @@
// SPDX-License-Identifier: GPL-3.0-only
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
using System.Globalization;
using FluentAssertions;
using FrameLedger.App.Services;
using FrameLedger.App.ViewModels;
using FrameLedger.Application.Persistence;
using FrameLedger.Application.Recording;
using FrameLedger.Domain.Sessions;
namespace FrameLedger.App.Tests;
/// <summary>
/// The game's own memory as the pages state it (beta.12, D43): Task Manager's units, the median with the peak beneath, the
/// working set LABELLED where the private working set is N/A, the process count where an unpinned hold summed several,
/// N/A for a session recorded before — and the per-series statistics table in each series' own unit.
/// </summary>
[Collection(StringsCultureCollection.Name)]
public sealed class GameMemoryTextTests
{
private static T InEnglish<T>(Func<T> f)
{
CultureInfo? previous = Strings.Culture;
CultureInfo previousCulture = CultureInfo.CurrentCulture;
try
{
Strings.Culture = CultureInfo.GetCultureInfo("en");
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en");
return f();
}
finally
{
Strings.Culture = previous;
CultureInfo.CurrentCulture = previousCulture;
}
}
private static SessionRow Row(bool hooked = true) => new()
{
SessionGuid = Guid.NewGuid(),
GameId = 1,
SnapshotId = 1,
StartedAt = DateTimeOffset.UnixEpoch,
EndedAt = DateTimeOffset.UnixEpoch.AddMinutes(10),
QpcEpoch = 0,
QpcFrequency = 1,
Tier = hooked ? CaptureTier.Hooked : CaptureTier.NotHooked,
Mode = CaptureMode.Launch,
ExitStatus = ExitStatus.Normal,
};
/// <summary>A session that read everything: 6.5 GiB dedicated at the median, 7 GiB peak, 512 MiB shared, 3 GiB private working set.</summary>
private static SessionRow Measured(bool hooked = true) => Row(hooked) with
{
GameVramDedicatedAvgMb = 6400,
GameVramDedicatedMedianMb = 6656,
GameVramDedicatedMaxMb = 7168,
GameVramSharedMaxMb = 512,
GameRamPrivateAvgMb = 3000,
GameRamPrivateMedianMb = 3072,
GameRamPrivateMaxMb = 3584,
GameRamWorkingSetMaxMb = 4096,
GameCommitMaxMb = 5120,
GameMemoryProcesses = 1,
GameMemorySource = "counters,ex2,held",
};
private static readonly Dictionary<string, SensorSeriesStats> _noStats = new(StringComparer.Ordinal);
[Fact]
public void MemoryIsStatedTheWayTaskManagerStatesItAndNeverAsZero()
{
InEnglish(() => Formats.Memory(null)).Should().Be("N/A");
InEnglish(() => Formats.Memory(0)).Should().Be("0 MB", "a zero that was READ is a reading");
InEnglish(() => Formats.Memory(812.4)).Should().Be("812 MB");
InEnglish(() => Formats.Memory(1023.4)).Should().Be("1,023 MB");
InEnglish(() => Formats.Memory(1023.6)).Should().Be("1.00 GB", "never \"1,024 MB\"");
InEnglish(() => Formats.Memory(1024)).Should().Be("1.00 GB", "1 GB = 1024 MB, Windows' own units");
InEnglish(() => Formats.Memory(6656)).Should().Be("6.50 GB");
InEnglish(() => Formats.Power(214.6)).Should().Be("215 W");
InEnglish(() => Formats.Power(null)).Should().Be("N/A");
}
[Fact]
public void TheCardsShowTheMedianWithThePeakBeneathInEitherTier()
{
foreach (bool hooked in new[] { true, false })
{
StatCardModel vram = InEnglish(() => GameMemoryText.VramCard(Measured(hooked)));
vram.Label.Should().Be("VRAM (this game)");
vram.Value.Should().Be("6.50 GB");
vram.Suffix.Should().Be("median · peak 7.00 GB · shared 512 MB");
StatCardModel ram = InEnglish(() => GameMemoryText.RamCard(Measured(hooked), _noStats));
ram.Label.Should().Be("RAM (this game)");
ram.Value.Should().Be("3.00 GB");
ram.Suffix.Should().Be("median · peak 3.50 GB · commit 5.00 GB");
}
}
[Fact]
public void ASessionRecordedBeforeBetaTwelveReadsNotAvailableWithNothingBeneath()
{
StatCardModel vram = InEnglish(() => GameMemoryText.VramCard(Row()));
vram.Value.Should().Be("N/A");
vram.Suffix.Should().BeNull();
InEnglish(() => GameMemoryText.RamCard(Row(), _noStats)).Value.Should().Be("N/A");
InEnglish(() => GameMemoryText.VramCell(Row())).Should().Be("N/A", "never \"N/A · N/A\"");
InEnglish(() => GameMemoryText.RamCell(Row(), _noStats)).Should().Be("N/A");
GameMemoryText.VramTooltip(Row()).Should().BeNull();
GameMemoryText.RamTooltip(Row(), _noStats).Should().BeNull();
GameMemoryText.ExportLine(Row()).Should().Be("N/A");
GameMemoryText.Live(null, null).Should().BeEmpty();
}
/// <summary>
/// A Windows without the September 2023 update reports no private working set: the working set takes its place and says
/// so — on the card, in the cell and in the tooltip — never passed off as Task Manager's "Memory".
/// </summary>
[Fact]
public void WithoutThePrivateWorkingSetTheWorkingSetIsShownAndSaysSo()
{
SessionRow row = Row() with { GameRamWorkingSetMaxMb = 4096, GameCommitMaxMb = 5120 };
var stats = new Dictionary<string, SensorSeriesStats>(StringComparer.Ordinal)
{
[SensorSeriesCatalog.GameRamWorkingSet] = new SensorSeriesStats(600, 3900, 3840, 1024, 4096),
};
StatCardModel card = InEnglish(() => GameMemoryText.RamCard(row, stats));
card.Label.Should().Be("RAM (this game, working set)");
card.Value.Should().Be("3.75 GB", "the working set's STORED median");
card.Suffix.Should().Contain("does not report the private working set");
InEnglish(() => GameMemoryText.RamCell(row, stats)).Should().Be("3.75 GB · 4.00 GB (working set)");
InEnglish(() => GameMemoryText.RamTooltip(row, stats)).Should().StartWith("This Windows does not report the private working set");
}
[Fact]
public void AnUnpinnedHoldThatSummedSeveralProcessesSaysHowMany()
{
SessionRow row = Measured(hooked: false) with { GameMemoryProcesses = 3, GameMemorySource = "counters,ex2,opened" };
InEnglish(() => GameMemoryText.VramCard(row)).Suffix.Should().EndWith("3 processes running the game's executable, added together");
InEnglish(() => GameMemoryText.RamCard(row, _noStats)).Suffix.Should().EndWith("3 processes running the game's executable, added together");
InEnglish(() => GameMemoryText.VramTooltip(row)).Should().Contain(Environment.NewLine + "3 processes");
InEnglish(() => GameMemoryText.VramCard(Measured())).Suffix.Should().NotContain("processes", "one process is the normal case");
}
[Fact]
public void TheGridCellsAreMedianAndPeakAndTheTooltipsCarryTheRest()
{
InEnglish(() => GameMemoryText.VramCell(Measured())).Should().Be("6.50 GB · 7.00 GB");
InEnglish(() => GameMemoryText.RamCell(Measured(), _noStats)).Should().Be("3.00 GB · 3.50 GB");
InEnglish(() => GameMemoryText.VramTooltip(Measured())).Should().Be("Dedicated GPU memory, as Task Manager counts it — mean 6.25 GB · median 6.50 GB · peak 7.00 GB. Shared GPU memory, peak 512 MB.");
InEnglish(() => GameMemoryText.RamTooltip(Measured(), _noStats)).Should().Be("Private working set (Task Manager's \"Memory\") — mean 2.93 GB · median 3.00 GB · peak 3.50 GB. Working set, peak 4.00 GB · commit, peak 5.00 GB.");
}
[Fact]
public void TheLiveLineAndTheExportLine()
{
InEnglish(() => GameMemoryText.Live(6656, 3072)).Should().Be("This game: VRAM 6.50 GB · RAM 3.00 GB");
InEnglish(() => GameMemoryText.Live(null, 3072)).Should().Be("This game: VRAM N/A · RAM 3.00 GB", "a game that has made no GPU allocation yet has no counter instance");
CultureInfo previous = CultureInfo.CurrentCulture;
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("vi-VN");
try
{
GameMemoryText.ExportLine(Measured() with { GameVramDedicatedAvgMb = 6400.24 }).Should().Be(
"vram_dedicated_mb avg=6400.2 median=6656 max=7168; vram_shared_mb max=512; ram_private_ws_mb avg=3000 median=3072 max=3584; ram_ws_mb max=4096; commit_mb max=5120; processes=1; source=counters,ex2,held",
"MiB, invariant: never the vi-VN decimal comma");
}
finally
{
CultureInfo.CurrentCulture = previous;
}
}
/// <summary>The statistics table: catalogue order, each series in its own unit and under its chart label, a series with no reading left out.</summary>
[Fact]
public void TheStatisticsTableIsTheStoredValuesInEachSeriesOwnUnit()
{
var stats = new Dictionary<string, SensorSeriesStats>(StringComparer.Ordinal)
{
[SensorSeriesCatalog.GameRamPrivate] = new SensorSeriesStats(600, 3000, 3072, 512, 3584),
[SensorSeriesCatalog.GpuTemp] = new SensorSeriesStats(600, 64.6, 65, 41, 72),
[SensorSeriesCatalog.GpuPower] = new SensorSeriesStats(600, 250.4, 260, 30, 330),
[SensorSeriesCatalog.GpuLoad] = new SensorSeriesStats(600, 91.2, 97, 3, 99),
[SensorSeriesCatalog.CpuTemp] = new SensorSeriesStats(0, null, null, null, null),
};
IReadOnlyList<SensorStatRowModel> rows = InEnglish(() => SensorStatsTable.Rows(stats));
rows.Select(static r => r.Series).Should().Equal(Strings.Sensors_Series_GpuTemp, Strings.Sensors_Series_GpuLoad, Strings.Sensors_Series_GpuPower, Strings.Sensors_Series_GameRam);
rows[0].Should().Be(new SensorStatRowModel(Strings.Sensors_Series_GpuTemp, "65 °C", "65 °C", "41 °C", "72 °C", "600"));
rows[1].Mean.Should().Be("91%");
rows[2].Max.Should().Be("330 W");
rows[3].Should().Be(new SensorStatRowModel(Strings.Sensors_Series_GameRam, "2.93 GB", "3.00 GB", "512 MB", "3.50 GB", "600"));
SensorStatsTable.Rows(_noStats).Should().BeEmpty("a session recorded before beta.12 stored none");
}
}
@@ -13,8 +13,11 @@ namespace FrameLedger.App.Tests;
/// <summary>
/// beta.11 (owner requests 2026-10-03): the library page counts its games, reloads itself while on screen when a session
/// ends or an import adds games, lets go when it leaves, and its grid's columns fill the width.
/// ends or an import adds games, lets go when it leaves, and its grid's columns fill the width. In the culture collection
/// (2026-10-03): a card's tooltip is resource text compared with the resource read again, and a class flipping
/// <c>Strings.Culture</c> in parallel between the two reads failed it once in a local run.
/// </summary>
[Collection(StringsCultureCollection.Name)]
public sealed class GamesViewModelTests
{
private static CancellationToken Ct => TestContext.Current.CancellationToken;
@@ -35,10 +35,11 @@ public sealed class LiveCaptureViewModelTests
card.Hold(new SessionHeldEvent(Guid.NewGuid(), 99, GpuTempC: 80));
card.ElapsedText.Should().BeEmpty("another session's tick");
card.Hold(new SessionHeldEvent(guid, 65, GpuTempC: 61.4, CpuTempC: 55.2));
card.Hold(new SessionHeldEvent(guid, 65, GpuTempC: 61.4, CpuTempC: 55.2, GameVramDedicatedMb: 2048, GameRamPrivateMb: 1536));
card.ElapsedText.Should().Contain(Formats.Duration(65));
card.GpuTempText.Should().Contain("61");
card.CpuTempText.Should().Contain("55");
card.MemoryText.Should().Be(GameMemoryText.Live(2048, 1536), "a held session has the game's memory too: it is read from outside the game (beta.12)");
card.Stop(new SessionCompletedEvent(guid, 3, "normal", 2, "saved", "TargetUnreadable"));
@@ -47,6 +48,7 @@ public sealed class LiveCaptureViewModelTests
card.GameName.Should().BeEmpty("until 2026-09-23 the name stayed, and the next notice could name the last game");
card.HeldReason.Should().BeEmpty();
card.ElapsedText.Should().BeEmpty();
card.MemoryText.Should().BeEmpty();
card.Tier.Should().Be(0);
}
+3 -1
View File
@@ -43,7 +43,8 @@ internal sealed class ScratchLedger : IAsyncDisposable
}
public async Task<long> SessionAsync(long gameId, DateTimeOffset startedAt, int seconds = 600, bool hooked = true, string fgMode = "none", double? native = 60, double? displayed = null, double? factor = null, ExitStatus exit = ExitStatus.Normal, string? fgRefusal = null, double? presented = null, string? qualifier = null,
IReadOnlyList<SensorBlob>? sensors = null, FrameLedger.Domain.Display.DisplaySummary? display = null, bool settingsChanged = false)
IReadOnlyList<SensorBlob>? sensors = null, FrameLedger.Domain.Display.DisplaySummary? display = null, bool settingsChanged = false,
Func<SessionRow, SessionRow>? shape = null)
{
long snapshotId = await new SqliteHardwareSnapshotRepository(Db).EnsureAsync(new HardwareSnapshot { GpuName = "G" }, startedAt, TestContext.Current.CancellationToken).ConfigureAwait(false);
var row = new SessionRow
@@ -79,6 +80,7 @@ internal sealed class ScratchLedger : IAsyncDisposable
SettingsChangedMidSession = settingsChanged,
};
row = FrameLedger.Application.Recording.SessionDisplayColumns.WithDisplay(row, display);
row = shape?.Invoke(row) ?? row;
return await Sessions.InsertFinalizedAsync(new FinalizedSession { Row = row, Sensors = sensors ?? [] }, TestContext.Current.CancellationToken).ConfigureAwait(false);
}
@@ -271,6 +271,8 @@ public sealed class SessionDeletionAndOverviewTests
[InlineData(TrendMetric.AvgGpuLoad, "%")]
[InlineData(TrendMetric.DisplayBorderlessShare, "%")]
[InlineData(TrendMetric.AvgGpuPower, "W")]
[InlineData(TrendMetric.AvgRam, "MB")]
[InlineData(TrendMetric.AvgRam, "GB")]
[InlineData(TrendMetric.GameVramPeak, "GB")]
[InlineData(TrendMetric.GameRamMedian, "GB")]
public void EachMetricHasItsUnit(TrendMetric metric, string unit) => TrendSeriesBuilder.UnitOf(metric).Should().StartWith(unit);
}
@@ -62,7 +62,8 @@ public sealed class SessionExporterTests
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
long id = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow, hooked: false);
long id = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow, hooked: false,
shape: static r => r with { GameVramDedicatedAvgMb = 1000, GameVramDedicatedMedianMb = 1024, GameVramDedicatedMaxMb = 2048, GameMemoryProcesses = 1, GameMemorySource = "counters" });
SessionRow row = (await s.Sessions.FindByIdAsync(id, Ct))!;
await s.Annotations.UpsertAsync(new SessionAnnotation { SessionId = id, Tags = ["bench"], Notes = "n" }, Ct);
@@ -72,6 +73,8 @@ public sealed class SessionExporterTests
lines.Should().Contain(static l => l.StartsWith("# capture_tier: 2", StringComparison.Ordinal) && l.Contains("no per-frame rows", StringComparison.Ordinal));
lines[^1].Should().Be(SessionExporter.CsvColumns, "the column line is the last line: nothing was measured");
lines.Should().Contain("# display: N/A (not recorded: a session recorded before beta.10, or recovered from its crash file)");
lines.Should().Contain("# game_memory: vram_dedicated_mb avg=1000 median=1024 max=2048; vram_shared_mb max=N/A; ram_private_ws_mb avg=N/A median=N/A max=N/A; ram_ws_mb max=N/A; commit_mb max=N/A; processes=1; source=counters",
"a Tier-2 session has the game's memory too (beta.12): a header line, the session's figure, never a per-frame column");
SessionExportDocument doc = SessionExporter.Document(row, game, null, [], await s.Annotations.FindAsync(id, Ct));
using var stream = new MemoryStream();
@@ -61,7 +61,7 @@ public sealed class SessionSummaryViewModelTests
vm.NotFound.Should().BeFalse();
vm.IsHooked.Should().BeTrue();
vm.Series.Should().NotBeNull();
vm.Stats.Should().HaveCount(11, "eight frame statistics, the display mode (beta.10), then the machine: GPU and CPU (2026-09-21)");
vm.Stats.Should().HaveCount(13, "eight frame statistics, the display mode (beta.10), the machine: GPU and CPU (2026-09-21), then the game's own memory (beta.12)");
vm.Stats.Single(c => string.Equals(c.Label, "CPU", StringComparison.Ordinal)).Value.Should().Be("N/A avg · N/A max", "this row carries no CPU reading: N/A, never 0%");
vm.Stats.Single(c => string.Equals(c.Label, "Median", StringComparison.Ordinal)).Value.Should().Be("60");
vm.Stats.Single(c => string.Equals(c.Label, "1% Low", StringComparison.Ordinal)).Value.Should().Be("48");
@@ -99,6 +99,82 @@ public sealed class SessionSummaryViewModelTests
}
}
/// <summary>A session recorded before beta.12 has its sensors and no stored statistics: N/A cards and one sentence, nothing computed here.</summary>
[Fact]
public async Task ASessionRecordedBeforeBetaTwelveSaysItsStatisticsWereNotStored()
{
CultureInfo? previous = Strings.Culture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
long hooked = await s.SessionWithFramesAsync(game.Id, DateTimeOffset.UtcNow, frames: 300, spikeEvery: 0);
SessionSummaryViewModel vm = Build(s);
await vm.LoadAsync(hooked, Ct);
vm.Stats.Single(c => string.Equals(c.Label, "VRAM (this game)", StringComparison.Ordinal)).Value.Should().Be("N/A", "this row predates the game's memory: N/A, never 0");
vm.Stats.Single(c => string.Equals(c.Label, "RAM (this game)", StringComparison.Ordinal)).Value.Should().Be("N/A");
vm.HasSensorCharts.Should().BeTrue();
vm.HasSensorStats.Should().BeFalse();
vm.SensorStats.Should().BeEmpty();
vm.SensorStatsMissing.Should().Be(Strings.SensorStats_NotStored, "it has sensors and no stored statistics: recorded before beta.12");
}
finally
{
Strings.Culture = previous;
}
}
/// <summary>
/// beta.12 (D43): a session that was NOT hooked has the game's memory too — read from outside the game — and the summary
/// shows it from the stored columns, with every series' stored statistics in the table, none recomputed.
/// </summary>
[Fact]
public async Task TheGamesMemoryAndTheStoredStatisticsAreShownForASessionThatWasNotHooked()
{
CultureInfo? previous = Strings.Culture;
CultureInfo previousCulture = CultureInfo.CurrentCulture;
Strings.Culture = CultureInfo.GetCultureInfo("en");
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en");
try
{
await using ScratchLedger s = await ScratchLedger.OpenAsync();
GameRow game = await s.GameAsync("Alpha");
string json = "{\"gpu_temp\":{\"N\":3,\"Mean\":56,\"Median\":56,\"Min\":55,\"Max\":57},\"game_vram_dedicated\":{\"N\":3,\"Mean\":6000,\"Median\":6144,\"Min\":5120,\"Max\":7168}}";
long id = await s.SessionAsync(game.Id, DateTimeOffset.UtcNow, hooked: false, shape: r => r with
{
GameVramDedicatedAvgMb = 6000,
GameVramDedicatedMedianMb = 6144,
GameVramDedicatedMaxMb = 7168,
GameVramSharedMaxMb = 256,
GameRamPrivateMedianMb = 2048,
GameRamPrivateMaxMb = 2560,
GameCommitMaxMb = 4096,
GameMemoryProcesses = 2,
SensorStatsJson = json,
});
SessionSummaryViewModel vm = Build(s);
await vm.LoadAsync(id, Ct);
vm.IsHooked.Should().BeFalse();
vm.Stats.Single(c => string.Equals(c.Label, "VRAM (this game)", StringComparison.Ordinal)).Should().Be(
new StatCardModel("VRAM (this game)", "6.00 GB", "median · peak 7.00 GB · shared 256 MB · 2 processes running the game's executable, added together"));
vm.Stats.Single(c => string.Equals(c.Label, "RAM (this game)", StringComparison.Ordinal)).Value.Should().Be("2.00 GB");
vm.HasSensorStats.Should().BeTrue();
vm.SensorStatsMissing.Should().BeNull();
vm.SensorStats.Select(static r => r.Series).Should().Equal("GPU core °C", "VRAM, this game (dedicated)");
vm.SensorStats[1].Should().Be(new SensorStatRowModel("VRAM, this game (dedicated)", "5.86 GB", "6.00 GB", "5.00 GB", "7.00 GB", "3"));
}
finally
{
Strings.Culture = previous;
CultureInfo.CurrentCulture = previousCulture;
}
}
[Fact]
public async Task AnOverrideWritesTheAnnotationBesideTheMeasurementAndOptionallyTheGameDefault()
{
@@ -100,20 +100,29 @@ public sealed class TrendSeriesBuilderTests
{
AvgGpuLoad = 97,
AvgGpuPowerW = 310,
VramProcMaxMb = 9000,
GameVramDedicatedMedianMb = 6144,
GameVramDedicatedMaxMb = 9216,
GameRamPrivateMedianMb = 3072,
GameRamPrivateMaxMb = 4096,
GameRamWorkingSetMaxMb = 5120,
AvgCpuLoad = 41.5,
MaxCpuTemp = 78,
AvgRamMb = 18000,
AvgRamMb = 18432,
};
SessionRow steady = Row(2, 1, fgMode: "dlssg", native: 70, displayed: 280, factor: 4) with { FgFactorScope = "steady", FgSteadyShare = 0.75, AvgCpuLoad = 50 };
SessionRow before = Row(3, 1);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.AvgGpuLoad).Should().Be(97);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.AvgGpuPower).Should().Be(310);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.MaxVramProcess).Should().Be(9000);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.GameVramMedian).Should().Be(6, "GB, 1 GB = 1024 MiB");
TrendSeriesBuilder.ValueOf(measured, TrendMetric.GameVramPeak).Should().Be(9);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.GameRamMedian).Should().Be(3);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.GameRamPeak).Should().Be(4);
TrendSeriesBuilder.ValueOf(measured with { GameRamPrivateMaxMb = null }, TrendMetric.GameRamPeak).Should().BeNull("the working set is another quantity and never takes the private working set's place on a line");
TrendSeriesBuilder.ValueOf(measured, TrendMetric.AvgCpuLoad).Should().Be(41.5);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.MaxCpuTemp).Should().Be(78);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.AvgRam).Should().Be(18000);
TrendSeriesBuilder.ValueOf(measured, TrendMetric.AvgRam).Should().Be(18);
TrendSeriesBuilder.Counts(Row(5, 1, hooked: false), TrendMetric.GameVramPeak).Should().BeTrue("the game's memory is read from outside it: a session that was not hooked has it too");
TrendSeriesBuilder.ValueOf(measured, TrendMetric.FgFactor).Should().Be(1.9);
TrendSeriesBuilder.ValueOf(before, TrendMetric.AvgCpuLoad).Should().BeNull("recorded before anything read the CPU");
TrendSeriesBuilder.ValueOf(before, TrendMetric.FgFactor).Should().BeNull("a measured none has no factor to plot");