1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! What the platform APIs moved, counted where this crate can see it.
//!
//! # These are not boundary bytes, and the distinction matters
//!
//! `blitz-wasm`'s [`Counters`] count bytes crossing the *guest* boundary: read
//! out of, or written into, wasm linear memory. The numbers here count bytes
//! crossing the *network and storage* boundary: what a request body carried,
//! what a response body brought back, what a storage value weighed.
//!
//! For one fetch they are usually close and never guaranteed equal. A guest
//! that starts a request and never reads the body moved 40 KB here and zero
//! there. A guest that reads the same body twice moved 40 KB here and 80 KB
//! there. Adding them would produce a number answering no question, which is
//! why they are separate types in separate crates rather than more fields on
//! one struct.
//!
//! Both exist because the brief asks for fetch bytes to be attributable
//! separately from DOM bytes in both directions. This half answers "what did
//! the platform move"; the binding's half answers "what did that cost at the
//! boundary".
//!
//! # No timing
//!
//! Same reason `blitz-wasm` gives: a duration measured on one machine, in one
//! build profile, is not evidence. A byte count is the same everywhere. A fetch
//! duration is additionally dominated by the network, which is the one part of
//! the system no design decision here changes.
//!
//! [`Counters`]: ../../blitz-wasm/src/counters.rs
/// Everything one [`PlatformHost`](crate::PlatformHost) has moved.