| 5 | "description": "What a client's stress runner records for one renderer on one device in one pass; tools/report.mjs turns one or more of these into the summary. See CLIENTS.md. A value the client cannot measure is null, never a guess.", |
| 6 | "type": "object", |
| 7 | "required": ["platform", "client", "renderer", "rendererKind", "device", "pass", "config", "runs"], |
| 8 | "properties": { |
| 9 | "kit": { |
| 10 | "type": "object", |
| 11 | "description": "The kit the widgets came from: manifest.json `version` and the widget-sandbox tag or commit.", |
| 12 | "properties": { "version": { "type": "integer" }, "commit": { "type": "string" } } |
| 13 | }, |
| 14 | "platform": { "type": "string", "description": "ios, macos, android, desktop, web, …" }, |
| 15 | "client": { "type": "string", "description": "The client: Telegram for iOS, Telegram for Android, Telegram Desktop, Telegram macOS, the web client, …" }, |
| 16 | "clientBuild": { "type": "string", "description": "The client's version or commit." }, |
| 17 | "framework": { "type": "string", "description": "The widget-sandbox tag or commit the client is on." }, |
| 18 | "renderer": { "type": "string", "description": "The renderer's name in the client: wkwebview, android-webview, twidget-core, litehtml, blitz, shadow, iframe, …" }, |
| 19 | "rendererKind": { "type": "string", "enum": ["webview", "own"], "description": "webview: a browser engine draws the ops (WKWebView, Android WebView, the web's iframe or Shadow DOM); own: the client's own engine lays out and paints (TwidgetCore, litehtml, Blitz)." }, |
| 20 | "engine": { "type": "string", "description": "Free text: the engine and its version (WebKit 621, Chrome WebView 141, litehtml 0.9, …)." }, |
| 21 | "device": { |
| 22 | "type": "object", |
| 23 | "required": ["model", "os", "class"], |
| 24 | "properties": { |
| 25 | "model": { "type": "string", "description": "Device model as the platform reports it (iPhone17,2; SM-A556B; MacBookPro18,1; …), or the CPU on a desktop." }, |
| 26 | "os": { "type": "string" }, |
| 27 | "class": { "type": "string", "enum": ["weak-android", "android", "iphone", "ipad", "desktop", "other"], "description": "weak-android: an A55-class phone (or weaker), the device the limits are chosen for." }, |
| 28 | "refreshHz": { "type": ["number", "null"], "description": "The display's refresh rate during the run." }, |
| 29 | "dpr": { "type": ["number", "null"], "description": "Device pixel ratio (UIScreen.scale, displayMetrics.density, …)." }, |
| 30 | "ramMb": { "type": ["number", "null"] }, |
| 31 | "lowPowerMode": { "type": ["boolean", "null"] } |
| 32 | } |
| 33 | }, |
| 34 | "pass": { "type": "string", "enum": ["measure", "production"], "description": "measure: CLIENTS.md's measuring configuration (compat, the quotas out of the way); production: the client's product configuration (strict, the default limits)." }, |
| 35 | "config": { |
| 36 | "type": "object", |
| 37 | "description": "The host configuration: what the runner asked for and, where the host can tell, what it applied (null = the host's default).", |
| 38 | "properties": { |
| 39 | "requested": { "type": "object" }, |
| 40 | "applied": { "type": "object" } |
| 41 | } |
| 42 | }, |
| 43 | "date": { "type": "string" }, |
| 44 | "runs": { |
| 45 | "type": "array", |
| 46 | "items": { |
| 47 | "type": "object", |
| 48 | "required": ["id", "loaded", "dead", "frames", "host", "widget"], |
| 49 | "properties": { |
| 50 | "id": { "type": "string", "description": "manifest.widgets[].id, e.g. shadow-moving/16" }, |
| 51 | "load": { "type": "string" }, |
| 52 | "value": { "type": "number" }, |
| 53 | "loaded": { "type": "boolean", "description": "The host reported loaded (the widget's scripts ran)." }, |
| 54 | "bootMs": { "type": ["number", "null"], "description": "From creating the host to loaded, ms." }, |
| 55 | "dead": { "type": ["string", "null"], "description": "Why the runtime stopped, if it did (the host's dead reason, verbatim)." }, |
| 56 | "diedAtMs": { "type": ["number", "null"], "description": "When it stopped, ms after creating the host." }, |
| 57 | "frames": { |
| 58 | "type": "object", |
| 59 | "description": "The client's own frames during the measuring window, from the platform (CADisplayLink, Choreographer + FrameMetrics, the desktop's frame clock, requestAnimationFrame on the web). Intervals between frames, ms.", |
| 60 | "required": ["count", "p50", "p95", "max", "dropped"], |
| 61 | "properties": { |
| 62 | "count": { "type": "integer" }, |
| 63 | "p50": { "type": ["number", "null"] }, |
| 64 | "p95": { "type": ["number", "null"] }, |
| 65 | "max": { "type": ["number", "null"] }, |
| 66 | "dropped": { "type": ["number", "null"], "description": "Share of display frames missed: sum of (round(interval / frame period) - 1) over sum of round(interval / frame period)." }, |
| 67 | "longTaskMs": { "type": ["number", "null"], "description": "Main-thread time in tasks over 50 ms during the window, where the platform reports it." }, |
| 68 | "mainThreadMsPerSec": { "type": ["number", "null"], "description": "Main-thread busy time per second, where the platform reports it (a frame timeline, os_signpost, systrace)." } |
| 69 | } |
| 70 | }, |
| 71 | "renderer": { |
| 72 | "type": ["object", "null"], |
| 73 | "description": "Own renderers: the renderer's own work on this widget per frame (applying the batch, style, layout, building and replaying the display list), ms. null for a WebView renderer.", |
| 74 | "properties": { |
| 75 | "msPerFrame": { "type": ["number", "null"], "description": "Mean over the frames it worked on." }, |
| 76 | "p95Ms": { "type": ["number", "null"] }, |
| 77 | "displayListOps": { "type": ["number", "null"], "description": "Display list size of the last frame, if the renderer counts it." } |
| 78 | } |
| 79 | }, |
| 80 | "host": { |
| 81 | "type": "object", |
| 82 | "description": "From the host's stats (SandboxStats / onStats) and the ops the renderer received, over the measuring window.", |
| 83 | "properties": { |
| 84 | "jsMsPerSec": { "type": ["number", "null"], "description": "Widget JS time per second (stats.jsMs delta / seconds)." }, |
| 85 | "opsPerSec": { "type": ["number", "null"], "description": "Validated ops per second: what the renderer received." }, |
| 86 | "queriesPerSec": { "type": ["number", "null"] }, |
| 87 | "queryMsPerSec": { "type": ["number", "null"], "description": "Time the host spent answering layout queries, per second." }, |
| 88 | "nodes": { "type": ["integer", "null"], "description": "The validator's node count at the end." }, |
| 89 | "memoryBytes": { "type": ["number", "null"], "description": "QuickJS heap at the end (stats.memoryBytes)." }, |
| 90 | "throttledTasks": { "type": ["integer", "null"], "description": "Tasks the CPU quota deferred during the window (0 in the measure pass)." }, |
| 91 | "maxBatchOps": { "type": ["integer", "null"], "description": "The largest validated batch since the widget was created." }, |
| 92 | "processMemoryMb": { "type": ["number", "null"], "description": "Optional: the app's resident memory at the end." } |
| 93 | } |
| 94 | }, |
| 95 | "widget": { |
| 96 | "type": "object", |
| 97 | "description": "The widget's own data-stress, as the sandbox sees it.", |
| 98 | "properties": { |
| 99 | "fps": { "type": ["number", "null"], "description": "Its requestAnimationFrame rate over the window: (frames at the end - at the start) / (t at the end - at the start)." }, |
| 100 | "frames": { "type": ["integer", "null"] }, |
| 101 | "maxGap": { "type": ["number", "null"], "description": "The largest gap between its frames it published during the window, ms." }, |
| 102 | "jank": { "type": ["integer", "null"], "description": "Its frames over 50 ms during the window." }, |
| 103 | "last": { "type": ["object", "null"], "description": "The last data-stress value, verbatim." } |
| 104 | } |
| 105 | }, |
| 106 | "thermal": { "type": ["string", "null"], "description": "Thermal state at the end, if the platform reports it (nominal, fair, serious, critical; PowerManager's status)." }, |
| 107 | "errors": { "type": "array", "items": { "type": "string" } }, |
| 108 | "diags": { "type": "object", "description": "Diagnostic kinds the host reported, with counts." } |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 |