Expand description
Persisted rows as the web page stores them: JavaScript values with ordered object fields, typed arrays and blobs.
The page writes plain JS objects into IndexedDB, and both its export package and the scenario fingerprint
(scripts/fingerprint-scenarios.ts) read them back field by field, in insertion order. The native host keeps the
same values, built field by field in the same order, so a native run’s rows can be compared with the page’s row
for row (fingerprint).
Structs§
- Obj
- An object: fields in insertion order. Setting an existing field keeps its position, as in JavaScript.
Enums§
- Js
- A JavaScript value as a row holds it.
- Typed
- The typed-array constructor a byte buffer stands for (its elements are little-endian).
Functions§
- canonical
- The value
scripts/fingerprint-scenarios.ts’scanon()makes of a row: wall-clock and id fields dropped, the run id replaced by<run>, typed arrays and blobs replaced by their digests,COMPUTE_BACKEND’s host-timed message and detail dropped. - detail
- A diagnostic
detailpayload as a value. - fingerprint
- A row’s fingerprint digest: the short SHA-256 of
JSON.stringify(canon(row)). - read_
rect - Reads
{ x, y, width, height }. - rect
{ x, y, width, height }.- short_
sha - The first 12 bytes of SHA-256, in hex: the fingerprint’s digest.
- to_
fixed Number.prototype.toFixed(digits): the exact value rounded half away from zero (JS picks the largernon a tie of the exact binary value), in plain notation below 1e21.- to_json
- to_
locale Number.prototype.toLocaleString()in theen-USlocale Deno and the page default to: grouped thousands, at most three fraction digits.- write_
json JSON.stringifyof a value (typed arrays and blobs must have been replaced first; seecanonical).