@dyno-cloud/schema 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1256,6 +1256,46 @@
1256
1256
  }
1257
1257
  ]
1258
1258
  },
1259
+ "MemorySample": {
1260
+ "description": "One process's memory at one moment.",
1261
+ "type": "object",
1262
+ "properties": {
1263
+ "private_bytes": {
1264
+ "description": "The memory that only this process holds, as the OS counts it for the process (see\n[`TimelineMethod`]).",
1265
+ "type": "integer",
1266
+ "format": "uint64",
1267
+ "minimum": 0
1268
+ },
1269
+ "resident_bytes": {
1270
+ "description": "Resident memory, shared pages included. Null when the method does not read it.",
1271
+ "type": [
1272
+ "integer",
1273
+ "null"
1274
+ ],
1275
+ "format": "uint64",
1276
+ "minimum": 0
1277
+ },
1278
+ "shared_bytes": {
1279
+ "description": "Resident shared memory, such as the buffers the GPU process and the renderers share. Null\nwhen the method does not read it.",
1280
+ "type": [
1281
+ "integer",
1282
+ "null"
1283
+ ],
1284
+ "format": "uint64",
1285
+ "minimum": 0
1286
+ },
1287
+ "t_ms": {
1288
+ "description": "Since the navigation, on the driver's clock.",
1289
+ "type": "integer",
1290
+ "format": "uint64",
1291
+ "minimum": 0
1292
+ }
1293
+ },
1294
+ "required": [
1295
+ "t_ms",
1296
+ "private_bytes"
1297
+ ]
1298
+ },
1259
1299
  "Method": {
1260
1300
  "description": "How a value was found. Declared in alphabetical order, so evidence sorts by name.",
1261
1301
  "oneOf": [
@@ -1343,6 +1383,36 @@
1343
1383
  "android"
1344
1384
  ]
1345
1385
  },
1386
+ "ProcessRole": {
1387
+ "description": "The part a process plays in the run, as far as the driver can tell.",
1388
+ "oneOf": [
1389
+ {
1390
+ "description": "It runs the game frame.",
1391
+ "type": "string",
1392
+ "const": "game"
1393
+ },
1394
+ {
1395
+ "description": "It runs the harness page.",
1396
+ "type": "string",
1397
+ "const": "page"
1398
+ },
1399
+ {
1400
+ "description": "The GPU process.",
1401
+ "type": "string",
1402
+ "const": "gpu"
1403
+ },
1404
+ {
1405
+ "description": "The browser's main process.",
1406
+ "type": "string",
1407
+ "const": "browser"
1408
+ },
1409
+ {
1410
+ "description": "Any other process, such as a spare renderer or the network service.",
1411
+ "type": "string",
1412
+ "const": "other"
1413
+ }
1414
+ ]
1415
+ },
1346
1416
  "ProfileRef": {
1347
1417
  "description": "Which host profile, and which version of it, a result used.",
1348
1418
  "type": "object",
@@ -1558,6 +1628,18 @@
1558
1628
  "tier": {
1559
1629
  "$ref": "#/$defs/TierReport"
1560
1630
  },
1631
+ "timeline": {
1632
+ "description": "The memory of each browser process through the browser run, with the run's steps. Null\nwhen the driver read none, such as on a machine without a sampler.",
1633
+ "anyOf": [
1634
+ {
1635
+ "$ref": "#/$defs/Timeline"
1636
+ },
1637
+ {
1638
+ "type": "null"
1639
+ }
1640
+ ],
1641
+ "default": null
1642
+ },
1561
1643
  "tool_build": {
1562
1644
  "$ref": "#/$defs/ToolBuild"
1563
1645
  }
@@ -1574,6 +1656,51 @@
1574
1656
  "tier"
1575
1657
  ]
1576
1658
  },
1659
+ "RunMark": {
1660
+ "description": "The steps of a run. They sort in the order they are declared.",
1661
+ "oneOf": [
1662
+ {
1663
+ "description": "The harness page started loading the game frame.",
1664
+ "type": "string",
1665
+ "const": "navigated"
1666
+ },
1667
+ {
1668
+ "description": "The game frame went idle.",
1669
+ "type": "string",
1670
+ "const": "idle"
1671
+ },
1672
+ {
1673
+ "description": "The harness made the game active, such as by sending `reels:active` `true`.",
1674
+ "type": "string",
1675
+ "const": "activated"
1676
+ },
1677
+ {
1678
+ "description": "The harness made the game inactive.",
1679
+ "type": "string",
1680
+ "const": "deactivated"
1681
+ },
1682
+ {
1683
+ "description": "The game frame committed a new document, as a script redirect does. Probe events after\nit are on the new document's clock.",
1684
+ "type": "string",
1685
+ "const": "frame_document"
1686
+ },
1687
+ {
1688
+ "description": "The driver forced a garbage collection and sent a critical memory pressure signal, after\nthe active watch. The memory after it is what the game holds once garbage and caches go.",
1689
+ "type": "string",
1690
+ "const": "purged"
1691
+ },
1692
+ {
1693
+ "description": "The phone's kernel killed the game's process: jetsam did, or it went over a fatal memory\nlimit.",
1694
+ "type": "string",
1695
+ "const": "killed"
1696
+ },
1697
+ {
1698
+ "description": "The game's process went over a memory limit that does not kill it, such as iOS's soft\nlimit.",
1699
+ "type": "string",
1700
+ "const": "over_memory_limit"
1701
+ }
1702
+ ]
1703
+ },
1577
1704
  "Scenario": {
1578
1705
  "description": "The harness scenario of a browser run.",
1579
1706
  "oneOf": [
@@ -1789,6 +1916,112 @@
1789
1916
  "phase"
1790
1917
  ]
1791
1918
  },
1919
+ "Timeline": {
1920
+ "description": "The memory of each browser process through one run.",
1921
+ "type": "object",
1922
+ "properties": {
1923
+ "every_ms": {
1924
+ "description": "The time between samples that the sampler asked for. A busy machine can make it longer.",
1925
+ "type": "integer",
1926
+ "format": "uint32",
1927
+ "minimum": 0
1928
+ },
1929
+ "marks": {
1930
+ "description": "The run's steps, on the samples' clock. Sorted by time, then step.",
1931
+ "type": "array",
1932
+ "items": {
1933
+ "$ref": "#/$defs/TimelineMark"
1934
+ }
1935
+ },
1936
+ "method": {
1937
+ "$ref": "#/$defs/TimelineMethod"
1938
+ },
1939
+ "processes": {
1940
+ "description": "Every process the sampler saw. Sorted by pid.",
1941
+ "type": "array",
1942
+ "items": {
1943
+ "$ref": "#/$defs/TimelineProcess"
1944
+ }
1945
+ }
1946
+ },
1947
+ "required": [
1948
+ "method",
1949
+ "every_ms",
1950
+ "marks",
1951
+ "processes"
1952
+ ]
1953
+ },
1954
+ "TimelineMark": {
1955
+ "description": "One step of the run, on the timeline's clock.",
1956
+ "type": "object",
1957
+ "properties": {
1958
+ "mark": {
1959
+ "$ref": "#/$defs/RunMark"
1960
+ },
1961
+ "t_ms": {
1962
+ "description": "Since the navigation, on the driver's clock.",
1963
+ "type": "integer",
1964
+ "format": "uint64",
1965
+ "minimum": 0
1966
+ }
1967
+ },
1968
+ "required": [
1969
+ "mark",
1970
+ "t_ms"
1971
+ ]
1972
+ },
1973
+ "TimelineMethod": {
1974
+ "description": "How a timeline's samples were read.",
1975
+ "oneOf": [
1976
+ {
1977
+ "description": "Linux's `/proc/<pid>/status`: `private_bytes` is `RssAnon` plus `VmSwap`, the private\nmemory footprint that Chromium reports on Linux.",
1978
+ "type": "string",
1979
+ "const": "proc"
1980
+ },
1981
+ {
1982
+ "description": "An Activity Monitor trace that xctrace exported, such as a device cloud's: `private_bytes`\nis the physical footprint that jetsam reads.",
1983
+ "type": "string",
1984
+ "const": "xctrace"
1985
+ },
1986
+ {
1987
+ "description": "The iPhone's sysmontap service, which `--device` reads: `private_bytes` is the physical\nfootprint that jetsam reads.",
1988
+ "type": "string",
1989
+ "const": "sysmontap"
1990
+ }
1991
+ ]
1992
+ },
1993
+ "TimelineProcess": {
1994
+ "description": "One process of the browser, and its memory through the run.",
1995
+ "type": "object",
1996
+ "properties": {
1997
+ "kind": {
1998
+ "description": "What the browser calls the process, such as \"renderer\", \"gpu-process\" or\n\"utility:network.mojom.NetworkService\", or its name, such as\n\"com.apple.WebKit.WebContent\".",
1999
+ "type": "string"
2000
+ },
2001
+ "pid": {
2002
+ "description": "The OS process id. It only tells processes apart within this run.",
2003
+ "type": "integer",
2004
+ "format": "uint32",
2005
+ "minimum": 0
2006
+ },
2007
+ "role": {
2008
+ "$ref": "#/$defs/ProcessRole"
2009
+ },
2010
+ "samples": {
2011
+ "description": "Sorted by time.",
2012
+ "type": "array",
2013
+ "items": {
2014
+ "$ref": "#/$defs/MemorySample"
2015
+ }
2016
+ }
2017
+ },
2018
+ "required": [
2019
+ "pid",
2020
+ "role",
2021
+ "kind",
2022
+ "samples"
2023
+ ]
2024
+ },
1792
2025
  "ToolBuild": {
1793
2026
  "description": "The dyno binary that made the result.",
1794
2027
  "type": "object",
@@ -164,6 +164,67 @@
164
164
  "t_ms"
165
165
  ]
166
166
  },
167
+ {
168
+ "description": "The memory of every browser process at one moment, read from the OS. A driver that cannot\nread it sends none.",
169
+ "type": "object",
170
+ "properties": {
171
+ "every_ms": {
172
+ "description": "The time between samples that the driver asked for.",
173
+ "type": "integer",
174
+ "format": "uint32",
175
+ "minimum": 0
176
+ },
177
+ "method": {
178
+ "$ref": "#/$defs/TimelineMethod"
179
+ },
180
+ "processes": {
181
+ "type": "array",
182
+ "items": {
183
+ "$ref": "#/$defs/ProcessMemory"
184
+ }
185
+ },
186
+ "t_ms": {
187
+ "type": "number",
188
+ "format": "double"
189
+ },
190
+ "type": {
191
+ "type": "string",
192
+ "const": "memory"
193
+ }
194
+ },
195
+ "required": [
196
+ "type",
197
+ "method",
198
+ "every_ms",
199
+ "processes",
200
+ "t_ms"
201
+ ]
202
+ },
203
+ {
204
+ "description": "The part that each named process plays in the run, as far as the driver knows. A later\n`roles` message overrides an earlier one for the same process. A process that no message\nnames is `other`.",
205
+ "type": "object",
206
+ "properties": {
207
+ "roles": {
208
+ "type": "array",
209
+ "items": {
210
+ "$ref": "#/$defs/AssignedRole"
211
+ }
212
+ },
213
+ "t_ms": {
214
+ "type": "number",
215
+ "format": "double"
216
+ },
217
+ "type": {
218
+ "type": "string",
219
+ "const": "roles"
220
+ }
221
+ },
222
+ "required": [
223
+ "type",
224
+ "roles",
225
+ "t_ms"
226
+ ]
227
+ },
167
228
  {
168
229
  "description": "The last line of a run that finished.",
169
230
  "type": "object",
@@ -206,6 +267,24 @@
206
267
  }
207
268
  ],
208
269
  "$defs": {
270
+ "AssignedRole": {
271
+ "description": "One process's part in a `roles` message.",
272
+ "type": "object",
273
+ "properties": {
274
+ "pid": {
275
+ "type": "integer",
276
+ "format": "uint32",
277
+ "minimum": 0
278
+ },
279
+ "role": {
280
+ "$ref": "#/$defs/ProcessRole"
281
+ }
282
+ },
283
+ "required": [
284
+ "pid",
285
+ "role"
286
+ ]
287
+ },
209
288
  "AudioState": {
210
289
  "description": "An audio context's state.",
211
290
  "type": "string",
@@ -675,8 +754,82 @@
675
754
  }
676
755
  ]
677
756
  },
757
+ "ProcessMemory": {
758
+ "description": "One process's memory in a `memory` message.",
759
+ "type": "object",
760
+ "properties": {
761
+ "kind": {
762
+ "description": "What the browser calls the process, such as \"renderer\" or \"gpu-process\".",
763
+ "type": "string"
764
+ },
765
+ "pid": {
766
+ "type": "integer",
767
+ "format": "uint32",
768
+ "minimum": 0
769
+ },
770
+ "private_bytes": {
771
+ "description": "The memory that only this process holds (see `TimelineMethod`).",
772
+ "type": "integer",
773
+ "format": "uint64",
774
+ "minimum": 0
775
+ },
776
+ "resident_bytes": {
777
+ "description": "Resident memory, shared pages included. Null when not read.",
778
+ "type": [
779
+ "integer",
780
+ "null"
781
+ ],
782
+ "format": "uint64",
783
+ "minimum": 0
784
+ },
785
+ "shared_bytes": {
786
+ "description": "Resident shared memory. Null when not read.",
787
+ "type": [
788
+ "integer",
789
+ "null"
790
+ ],
791
+ "format": "uint64",
792
+ "minimum": 0
793
+ }
794
+ },
795
+ "required": [
796
+ "pid",
797
+ "kind",
798
+ "private_bytes"
799
+ ]
800
+ },
801
+ "ProcessRole": {
802
+ "description": "The part a process plays in the run, as far as the driver can tell.",
803
+ "oneOf": [
804
+ {
805
+ "description": "It runs the game frame.",
806
+ "type": "string",
807
+ "const": "game"
808
+ },
809
+ {
810
+ "description": "It runs the harness page.",
811
+ "type": "string",
812
+ "const": "page"
813
+ },
814
+ {
815
+ "description": "The GPU process.",
816
+ "type": "string",
817
+ "const": "gpu"
818
+ },
819
+ {
820
+ "description": "The browser's main process.",
821
+ "type": "string",
822
+ "const": "browser"
823
+ },
824
+ {
825
+ "description": "Any other process, such as a spare renderer or the network service.",
826
+ "type": "string",
827
+ "const": "other"
828
+ }
829
+ ]
830
+ },
678
831
  "RunMark": {
679
- "description": "The steps of a run.",
832
+ "description": "The steps of a run. They sort in the order they are declared.",
680
833
  "oneOf": [
681
834
  {
682
835
  "description": "The harness page started loading the game frame.",
@@ -702,6 +855,21 @@
702
855
  "description": "The game frame committed a new document, as a script redirect does. Probe events after\nit are on the new document's clock.",
703
856
  "type": "string",
704
857
  "const": "frame_document"
858
+ },
859
+ {
860
+ "description": "The driver forced a garbage collection and sent a critical memory pressure signal, after\nthe active watch. The memory after it is what the game holds once garbage and caches go.",
861
+ "type": "string",
862
+ "const": "purged"
863
+ },
864
+ {
865
+ "description": "The phone's kernel killed the game's process: jetsam did, or it went over a fatal memory\nlimit.",
866
+ "type": "string",
867
+ "const": "killed"
868
+ },
869
+ {
870
+ "description": "The game's process went over a memory limit that does not kill it, such as iOS's soft\nlimit.",
871
+ "type": "string",
872
+ "const": "over_memory_limit"
705
873
  }
706
874
  ]
707
875
  },
@@ -719,6 +887,26 @@
719
887
  "const": "canvas"
720
888
  }
721
889
  ]
890
+ },
891
+ "TimelineMethod": {
892
+ "description": "How a timeline's samples were read.",
893
+ "oneOf": [
894
+ {
895
+ "description": "Linux's `/proc/<pid>/status`: `private_bytes` is `RssAnon` plus `VmSwap`, the private\nmemory footprint that Chromium reports on Linux.",
896
+ "type": "string",
897
+ "const": "proc"
898
+ },
899
+ {
900
+ "description": "An Activity Monitor trace that xctrace exported, such as a device cloud's: `private_bytes`\nis the physical footprint that jetsam reads.",
901
+ "type": "string",
902
+ "const": "xctrace"
903
+ },
904
+ {
905
+ "description": "The iPhone's sysmontap service, which `--device` reads: `private_bytes` is the physical\nfootprint that jetsam reads.",
906
+ "type": "string",
907
+ "const": "sysmontap"
908
+ }
909
+ ]
722
910
  }
723
911
  }
724
912
  }
@@ -1202,6 +1202,46 @@
1202
1202
  }
1203
1203
  ]
1204
1204
  },
1205
+ "MemorySample": {
1206
+ "description": "One process's memory at one moment.",
1207
+ "type": "object",
1208
+ "properties": {
1209
+ "private_bytes": {
1210
+ "description": "The memory that only this process holds, as the OS counts it for the process (see\n[`TimelineMethod`]).",
1211
+ "type": "integer",
1212
+ "format": "uint64",
1213
+ "minimum": 0
1214
+ },
1215
+ "resident_bytes": {
1216
+ "description": "Resident memory, shared pages included. Null when the method does not read it.",
1217
+ "type": [
1218
+ "integer",
1219
+ "null"
1220
+ ],
1221
+ "format": "uint64",
1222
+ "minimum": 0
1223
+ },
1224
+ "shared_bytes": {
1225
+ "description": "Resident shared memory, such as the buffers the GPU process and the renderers share. Null\nwhen the method does not read it.",
1226
+ "type": [
1227
+ "integer",
1228
+ "null"
1229
+ ],
1230
+ "format": "uint64",
1231
+ "minimum": 0
1232
+ },
1233
+ "t_ms": {
1234
+ "description": "Since the navigation, on the driver's clock.",
1235
+ "type": "integer",
1236
+ "format": "uint64",
1237
+ "minimum": 0
1238
+ }
1239
+ },
1240
+ "required": [
1241
+ "t_ms",
1242
+ "private_bytes"
1243
+ ]
1244
+ },
1205
1245
  "Method": {
1206
1246
  "description": "How a value was found. Declared in alphabetical order, so evidence sorts by name.",
1207
1247
  "oneOf": [
@@ -1289,6 +1329,36 @@
1289
1329
  "android"
1290
1330
  ]
1291
1331
  },
1332
+ "ProcessRole": {
1333
+ "description": "The part a process plays in the run, as far as the driver can tell.",
1334
+ "oneOf": [
1335
+ {
1336
+ "description": "It runs the game frame.",
1337
+ "type": "string",
1338
+ "const": "game"
1339
+ },
1340
+ {
1341
+ "description": "It runs the harness page.",
1342
+ "type": "string",
1343
+ "const": "page"
1344
+ },
1345
+ {
1346
+ "description": "The GPU process.",
1347
+ "type": "string",
1348
+ "const": "gpu"
1349
+ },
1350
+ {
1351
+ "description": "The browser's main process.",
1352
+ "type": "string",
1353
+ "const": "browser"
1354
+ },
1355
+ {
1356
+ "description": "Any other process, such as a spare renderer or the network service.",
1357
+ "type": "string",
1358
+ "const": "other"
1359
+ }
1360
+ ]
1361
+ },
1292
1362
  "ProfileRef": {
1293
1363
  "description": "Which host profile, and which version of it, a result used.",
1294
1364
  "type": "object",
@@ -1504,6 +1574,18 @@
1504
1574
  "tier": {
1505
1575
  "$ref": "#/$defs/TierReport"
1506
1576
  },
1577
+ "timeline": {
1578
+ "description": "The memory of each browser process through the browser run, with the run's steps. Null\nwhen the driver read none, such as on a machine without a sampler.",
1579
+ "anyOf": [
1580
+ {
1581
+ "$ref": "#/$defs/Timeline"
1582
+ },
1583
+ {
1584
+ "type": "null"
1585
+ }
1586
+ ],
1587
+ "default": null
1588
+ },
1507
1589
  "tool_build": {
1508
1590
  "$ref": "#/$defs/ToolBuild"
1509
1591
  }
@@ -1520,6 +1602,51 @@
1520
1602
  "tier"
1521
1603
  ]
1522
1604
  },
1605
+ "RunMark": {
1606
+ "description": "The steps of a run. They sort in the order they are declared.",
1607
+ "oneOf": [
1608
+ {
1609
+ "description": "The harness page started loading the game frame.",
1610
+ "type": "string",
1611
+ "const": "navigated"
1612
+ },
1613
+ {
1614
+ "description": "The game frame went idle.",
1615
+ "type": "string",
1616
+ "const": "idle"
1617
+ },
1618
+ {
1619
+ "description": "The harness made the game active, such as by sending `reels:active` `true`.",
1620
+ "type": "string",
1621
+ "const": "activated"
1622
+ },
1623
+ {
1624
+ "description": "The harness made the game inactive.",
1625
+ "type": "string",
1626
+ "const": "deactivated"
1627
+ },
1628
+ {
1629
+ "description": "The game frame committed a new document, as a script redirect does. Probe events after\nit are on the new document's clock.",
1630
+ "type": "string",
1631
+ "const": "frame_document"
1632
+ },
1633
+ {
1634
+ "description": "The driver forced a garbage collection and sent a critical memory pressure signal, after\nthe active watch. The memory after it is what the game holds once garbage and caches go.",
1635
+ "type": "string",
1636
+ "const": "purged"
1637
+ },
1638
+ {
1639
+ "description": "The phone's kernel killed the game's process: jetsam did, or it went over a fatal memory\nlimit.",
1640
+ "type": "string",
1641
+ "const": "killed"
1642
+ },
1643
+ {
1644
+ "description": "The game's process went over a memory limit that does not kill it, such as iOS's soft\nlimit.",
1645
+ "type": "string",
1646
+ "const": "over_memory_limit"
1647
+ }
1648
+ ]
1649
+ },
1523
1650
  "Scenario": {
1524
1651
  "description": "The harness scenario of a browser run.",
1525
1652
  "oneOf": [
@@ -1712,6 +1839,112 @@
1712
1839
  "phase"
1713
1840
  ]
1714
1841
  },
1842
+ "Timeline": {
1843
+ "description": "The memory of each browser process through one run.",
1844
+ "type": "object",
1845
+ "properties": {
1846
+ "every_ms": {
1847
+ "description": "The time between samples that the sampler asked for. A busy machine can make it longer.",
1848
+ "type": "integer",
1849
+ "format": "uint32",
1850
+ "minimum": 0
1851
+ },
1852
+ "marks": {
1853
+ "description": "The run's steps, on the samples' clock. Sorted by time, then step.",
1854
+ "type": "array",
1855
+ "items": {
1856
+ "$ref": "#/$defs/TimelineMark"
1857
+ }
1858
+ },
1859
+ "method": {
1860
+ "$ref": "#/$defs/TimelineMethod"
1861
+ },
1862
+ "processes": {
1863
+ "description": "Every process the sampler saw. Sorted by pid.",
1864
+ "type": "array",
1865
+ "items": {
1866
+ "$ref": "#/$defs/TimelineProcess"
1867
+ }
1868
+ }
1869
+ },
1870
+ "required": [
1871
+ "method",
1872
+ "every_ms",
1873
+ "marks",
1874
+ "processes"
1875
+ ]
1876
+ },
1877
+ "TimelineMark": {
1878
+ "description": "One step of the run, on the timeline's clock.",
1879
+ "type": "object",
1880
+ "properties": {
1881
+ "mark": {
1882
+ "$ref": "#/$defs/RunMark"
1883
+ },
1884
+ "t_ms": {
1885
+ "description": "Since the navigation, on the driver's clock.",
1886
+ "type": "integer",
1887
+ "format": "uint64",
1888
+ "minimum": 0
1889
+ }
1890
+ },
1891
+ "required": [
1892
+ "mark",
1893
+ "t_ms"
1894
+ ]
1895
+ },
1896
+ "TimelineMethod": {
1897
+ "description": "How a timeline's samples were read.",
1898
+ "oneOf": [
1899
+ {
1900
+ "description": "Linux's `/proc/<pid>/status`: `private_bytes` is `RssAnon` plus `VmSwap`, the private\nmemory footprint that Chromium reports on Linux.",
1901
+ "type": "string",
1902
+ "const": "proc"
1903
+ },
1904
+ {
1905
+ "description": "An Activity Monitor trace that xctrace exported, such as a device cloud's: `private_bytes`\nis the physical footprint that jetsam reads.",
1906
+ "type": "string",
1907
+ "const": "xctrace"
1908
+ },
1909
+ {
1910
+ "description": "The iPhone's sysmontap service, which `--device` reads: `private_bytes` is the physical\nfootprint that jetsam reads.",
1911
+ "type": "string",
1912
+ "const": "sysmontap"
1913
+ }
1914
+ ]
1915
+ },
1916
+ "TimelineProcess": {
1917
+ "description": "One process of the browser, and its memory through the run.",
1918
+ "type": "object",
1919
+ "properties": {
1920
+ "kind": {
1921
+ "description": "What the browser calls the process, such as \"renderer\", \"gpu-process\" or\n\"utility:network.mojom.NetworkService\", or its name, such as\n\"com.apple.WebKit.WebContent\".",
1922
+ "type": "string"
1923
+ },
1924
+ "pid": {
1925
+ "description": "The OS process id. It only tells processes apart within this run.",
1926
+ "type": "integer",
1927
+ "format": "uint32",
1928
+ "minimum": 0
1929
+ },
1930
+ "role": {
1931
+ "$ref": "#/$defs/ProcessRole"
1932
+ },
1933
+ "samples": {
1934
+ "description": "Sorted by time.",
1935
+ "type": "array",
1936
+ "items": {
1937
+ "$ref": "#/$defs/MemorySample"
1938
+ }
1939
+ }
1940
+ },
1941
+ "required": [
1942
+ "pid",
1943
+ "role",
1944
+ "kind",
1945
+ "samples"
1946
+ ]
1947
+ },
1715
1948
  "ToolBuild": {
1716
1949
  "description": "The dyno binary that made the result.",
1717
1950
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyno-cloud/schema",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "TypeScript types and JSON Schema for the JSON that dyno writes: check results, compare results, the runner protocol and the probe events.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
@@ -0,0 +1,7 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { ProcessRole } from "./ProcessRole";
3
+
4
+ /**
5
+ * One process's part in a `roles` message.
6
+ */
7
+ export type AssignedRole = { pid: number, role: ProcessRole, };
@@ -1,7 +1,10 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { AssignedRole } from "./AssignedRole";
2
3
  import type { DriverInfo } from "./DriverInfo";
3
4
  import type { ProbeEvent } from "./ProbeEvent";
5
+ import type { ProcessMemory } from "./ProcessMemory";
4
6
  import type { RunMark } from "./RunMark";
7
+ import type { TimelineMethod } from "./TimelineMethod";
5
8
 
6
9
  /**
7
10
  * One line from a driver. `t_ms` is the time since the driver started the navigation.
@@ -27,4 +30,8 @@ webgl_renderer: string | null,
27
30
  * at frame time `t` happened at `t + frame_clock_at_ms` after the navigation. Null from
28
31
  * a driver that does not read it.
29
32
  */
30
- frame_clock_at_ms: number | null, t_ms: number, } | { "type": "mark", mark: RunMark, t_ms: number, } | { "type": "done", t_ms: number, } | { "type": "error", message: string, t_ms: number, };
33
+ frame_clock_at_ms: number | null, t_ms: number, } | { "type": "mark", mark: RunMark, t_ms: number, } | { "type": "memory", method: TimelineMethod,
34
+ /**
35
+ * The time between samples that the driver asked for.
36
+ */
37
+ every_ms: number, processes: Array<ProcessMemory>, t_ms: number, } | { "type": "roles", roles: Array<AssignedRole>, t_ms: number, } | { "type": "done", t_ms: number, } | { "type": "error", message: string, t_ms: number, };
@@ -0,0 +1,24 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * One process's memory at one moment.
5
+ */
6
+ export type MemorySample = {
7
+ /**
8
+ * Since the navigation, on the driver's clock.
9
+ */
10
+ t_ms: number,
11
+ /**
12
+ * The memory that only this process holds, as the OS counts it for the process (see
13
+ * [`TimelineMethod`]).
14
+ */
15
+ private_bytes: number,
16
+ /**
17
+ * Resident memory, shared pages included. Null when the method does not read it.
18
+ */
19
+ resident_bytes: number | null,
20
+ /**
21
+ * Resident shared memory, such as the buffers the GPU process and the renderers share. Null
22
+ * when the method does not read it.
23
+ */
24
+ shared_bytes: number | null, };
@@ -0,0 +1,22 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * One process's memory in a `memory` message.
5
+ */
6
+ export type ProcessMemory = { pid: number,
7
+ /**
8
+ * What the browser calls the process, such as "renderer" or "gpu-process".
9
+ */
10
+ kind: string,
11
+ /**
12
+ * The memory that only this process holds (see `TimelineMethod`).
13
+ */
14
+ private_bytes: number,
15
+ /**
16
+ * Resident memory, shared pages included. Null when not read.
17
+ */
18
+ resident_bytes: number | null,
19
+ /**
20
+ * Resident shared memory. Null when not read.
21
+ */
22
+ shared_bytes: number | null, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * The part a process plays in the run, as far as the driver can tell.
5
+ */
6
+ export type ProcessRole = "game" | "page" | "gpu" | "browser" | "other";
package/ts/RunInfo.ts CHANGED
@@ -8,6 +8,7 @@ import type { Measure } from "./Measure";
8
8
  import type { Release } from "./Release";
9
9
  import type { Target } from "./Target";
10
10
  import type { TierReport } from "./TierReport";
11
+ import type { Timeline } from "./Timeline";
11
12
  import type { ToolBuild } from "./ToolBuild";
12
13
 
13
14
  /**
@@ -47,4 +48,9 @@ measures: Array<Measure>,
47
48
  * Lab rule findings, such as the host contract checks. Sorted by rule id, then by the
48
49
  * finding's canonical JSON.
49
50
  */
50
- findings: Array<Finding>, tier: TierReport, };
51
+ findings: Array<Finding>, tier: TierReport,
52
+ /**
53
+ * The memory of each browser process through the browser run, with the run's steps. Null
54
+ * when the driver read none, such as on a machine without a sampler.
55
+ */
56
+ timeline?: Timeline | null, };
package/ts/RunMark.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
2
 
3
3
  /**
4
- * The steps of a run.
4
+ * The steps of a run. They sort in the order they are declared.
5
5
  */
6
- export type RunMark = "navigated" | "idle" | "activated" | "deactivated" | "frame_document";
6
+ export type RunMark = "navigated" | "idle" | "activated" | "deactivated" | "frame_document" | "purged" | "killed" | "over_memory_limit";
package/ts/Timeline.ts ADDED
@@ -0,0 +1,21 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { TimelineMark } from "./TimelineMark";
3
+ import type { TimelineMethod } from "./TimelineMethod";
4
+ import type { TimelineProcess } from "./TimelineProcess";
5
+
6
+ /**
7
+ * The memory of each browser process through one run.
8
+ */
9
+ export type Timeline = { method: TimelineMethod,
10
+ /**
11
+ * The time between samples that the sampler asked for. A busy machine can make it longer.
12
+ */
13
+ every_ms: number,
14
+ /**
15
+ * The run's steps, on the samples' clock. Sorted by time, then step.
16
+ */
17
+ marks: Array<TimelineMark>,
18
+ /**
19
+ * Every process the sampler saw. Sorted by pid.
20
+ */
21
+ processes: Array<TimelineProcess>, };
@@ -0,0 +1,11 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { RunMark } from "./RunMark";
3
+
4
+ /**
5
+ * One step of the run, on the timeline's clock.
6
+ */
7
+ export type TimelineMark = { mark: RunMark,
8
+ /**
9
+ * Since the navigation, on the driver's clock.
10
+ */
11
+ t_ms: number, };
@@ -0,0 +1,6 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+
3
+ /**
4
+ * How a timeline's samples were read.
5
+ */
6
+ export type TimelineMethod = "proc" | "xctrace" | "sysmontap";
@@ -0,0 +1,22 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ import type { MemorySample } from "./MemorySample";
3
+ import type { ProcessRole } from "./ProcessRole";
4
+
5
+ /**
6
+ * One process of the browser, and its memory through the run.
7
+ */
8
+ export type TimelineProcess = {
9
+ /**
10
+ * The OS process id. It only tells processes apart within this run.
11
+ */
12
+ pid: number, role: ProcessRole,
13
+ /**
14
+ * What the browser calls the process, such as "renderer", "gpu-process" or
15
+ * "utility:network.mojom.NetworkService", or its name, such as
16
+ * "com.apple.WebKit.WebContent".
17
+ */
18
+ kind: string,
19
+ /**
20
+ * Sorted by time.
21
+ */
22
+ samples: Array<MemorySample>, };
package/ts/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // Generated by dyno-schema. Do not edit this file manually.
2
2
  export type * from "./AssetChange";
3
3
  export type * from "./AssetChangeKind";
4
+ export type * from "./AssignedRole";
4
5
  export type * from "./AudioState";
5
6
  export type * from "./BrowserEngine";
6
7
  export type * from "./BudgetId";
@@ -53,10 +54,13 @@ export type * from "./MeasureId";
53
54
  export type * from "./MeasureItem";
54
55
  export type * from "./MeasureStatus";
55
56
  export type * from "./MeasureValue";
57
+ export type * from "./MemorySample";
56
58
  export type * from "./MessageDirection";
57
59
  export type * from "./Method";
58
60
  export type * from "./OsName";
59
61
  export type * from "./ProbeEvent";
62
+ export type * from "./ProcessMemory";
63
+ export type * from "./ProcessRole";
60
64
  export type * from "./ProfileRef";
61
65
  export type * from "./Quantity";
62
66
  export type * from "./RelPath";
@@ -78,6 +82,10 @@ export type * from "./Status";
78
82
  export type * from "./Target";
79
83
  export type * from "./Tier";
80
84
  export type * from "./TierReport";
85
+ export type * from "./Timeline";
86
+ export type * from "./TimelineMark";
87
+ export type * from "./TimelineMethod";
88
+ export type * from "./TimelineProcess";
81
89
  export type * from "./ToolBuild";
82
90
  export type * from "./Uncertainty";
83
91
  export type * from "./UncertaintyKind";