@margoengine/stats 0.1.0 → 1.0.0

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.
package/dist/beacon.js CHANGED
@@ -1,10 +1,10 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  import { MargoError as e } from "@margoengine/math/errors";
5
5
  //#region src/beacon.ts
6
- var t = 256, n = .1, r = Math.log(1e5) / t, i = (e) => Math.round(e * 100) / 100, a = class a {coreRequirement=__margoCoreRequirement("0.1.0",import.meta.url);
7
- static attach(e, t) {__margoAssertCore(e,__margoCoreRequirement("0.1.0",import.meta.url));
6
+ var t = 256, n = .1, r = Math.log(1e5) / t, i = (e) => Math.round(e * 100) / 100, a = class a {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
7
+ static attach(e, t) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
8
8
  let n = new a(t);
9
9
  try {
10
10
  return e.use(n), n;
package/dist/compile.js CHANGED
@@ -1,4 +1,4 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  import { MargoError as e } from "@margoengine/math/errors";
@@ -15,8 +15,8 @@ var t = [
15
15
  createComputePipeline: "compute",
16
16
  createRenderPipelineAsync: "render",
17
17
  createComputePipelineAsync: "compute"
18
- }, r = (e, t) => e.milliseconds ?? t - e.startedAt, i = class i {coreRequirement=__margoCoreRequirement("0.1.0",import.meta.url);
19
- static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("0.1.0",import.meta.url));
18
+ }, r = (e, t) => e.milliseconds ?? t - e.startedAt, i = class i {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
19
+ static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
20
20
  let n = new i(t);
21
21
  return e.use(n), n;
22
22
  }
package/dist/geometry.js CHANGED
@@ -1,13 +1,13 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  import { MargoError as e } from "@margoengine/math/errors";
5
5
  //#region src/geometry.ts
6
- var t = class t {coreRequirement=__margoCoreRequirement("0.1.0",import.meta.url);
6
+ var t = class t {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
7
7
  constructor(e = {}) {
8
8
  this.options = e, this.name = "stats-geometry", this.triangles = 0, this.vertices = 0, this.instances = 0, this.drawCalls = 0, this.unknownDraws = 0, this.disposed = !1, this.frameOpen = !1, this.pipelines = /* @__PURE__ */ new WeakMap(), this.encoders = /* @__PURE__ */ new WeakSet(), this.devices = /* @__PURE__ */ new WeakSet(), this.contexts = /* @__PURE__ */ new WeakSet(), this.restores = [];
9
9
  }
10
- static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("0.1.0",import.meta.url));
10
+ static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
11
11
  let r = new t(n);
12
12
  return e.use(r), r;
13
13
  }
package/dist/gl.js CHANGED
@@ -1,15 +1,15 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  import { MargoError as e } from "@margoengine/math/errors";
5
5
  //#region src/gl.ts
6
- var t = class t {coreRequirement=__margoCoreRequirement("0.1.0",import.meta.url);
6
+ var t = class t {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
7
7
  constructor({ maxPasses: e = 128, maxPendingFrames: t = 4 } = {}) {
8
8
  if (this.name = "stats-gl", this.drawCalls = 0, this.frameMilliseconds = null, this.passes = [], this.sampleId = 0, this.droppedFrames = 0, this.frameOpen = !1, this.passName = null, this.passCount = 0, this.pending = [], this.pool = [], this.restore = [], this.disposed = !1, !Number.isInteger(e) || e < 1 || e > 128) throw RangeError("Invalid maxPasses; use an integer from 1 to 128.");
9
9
  if (!Number.isInteger(t) || t < 1 || t > 8) throw RangeError("Invalid maxPendingFrames; use an integer from 1 to 8.");
10
10
  this.maxPasses = e, this.maxPending = t;
11
11
  }
12
- static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("0.1.0",import.meta.url));
12
+ static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
13
13
  let r = new t(n);
14
14
  return e.use(r), r;
15
15
  }
package/dist/leaks.js CHANGED
@@ -1,10 +1,10 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  import { MargoError as e } from "@margoengine/math/errors";
5
5
  //#region src/leaks.ts
6
6
  var t = (e) => console.warn(`Possible leak: ${e.name} keeps growing, ${e.from} to ${e.to} (${Math.round(e.perMinute)} per minute)`), n = class n {
7
- static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("0.1.0",import.meta.url));
7
+ static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
8
8
  return new n(t, e);
9
9
  }
10
10
  constructor({ intervalMilliseconds: e = 5e3, window: n = 48, minBytes: r = 1048576, minCount: i = 16, maxSeries: a = 64, warn: o = t } = {}, s) {
package/dist/panels.js CHANGED
@@ -1,4 +1,4 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  import { n as e, t } from "./src-DtZiAj6x.js";
@@ -51,7 +51,7 @@ var o = class {
51
51
  "cpuMilliseconds",
52
52
  "gpuMilliseconds",
53
53
  "memoryBytes"
54
- ], c = class e {coreRequirement=__margoCoreRequirement("0.1.0",import.meta.url);
54
+ ], c = class e {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
55
55
  constructor(e = {}) {
56
56
  this.options = e, this.name = "stats-panels", this.sampleCount = 0, this.sampleIndex = 0, this.phases = new n(), this.gpuTime = null, this.gpuPasses = [], this.latestPasses = [], this.queued = !1, this.disposed = !1, this.memoryLabel = "Memory MiB", this.version = 0, this.shown = -1, this.collect = () => {
57
57
  if (this.queued = !1, this.disposed) return;
@@ -84,7 +84,7 @@ var o = class {
84
84
  this.version !== this.shown && this.refresh();
85
85
  }, i);
86
86
  }
87
- static attach(t, n = {}) {__margoAssertCore(t,__margoCoreRequirement("0.1.0",import.meta.url));
87
+ static attach(t, n = {}) {__margoAssertCore(t,__margoCoreRequirement("1.0.0",import.meta.url));
88
88
  let r = new e(n);
89
89
  try {
90
90
  return t.use(r), r;
package/dist/phases.js CHANGED
@@ -1,4 +1,4 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  import { MargoError as e } from "@margoengine/math/errors";
@@ -19,8 +19,8 @@ var t = [
19
19
  submit: 0,
20
20
  other: 0,
21
21
  total: 0
22
- }), d = class d {coreRequirement=__margoCoreRequirement("0.1.0",import.meta.url);
23
- static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("0.1.0",import.meta.url));
22
+ }), d = class d {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
23
+ static attach(e, t = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
24
24
  let n = new d(t);
25
25
  return e.use(n), n;
26
26
  }
package/dist/report.js CHANGED
@@ -1,4 +1,4 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  //#region src/report.ts
@@ -41,7 +41,7 @@ function n(e) {
41
41
  return u * (e.sampleCount ?? 1);
42
42
  }
43
43
  var r = class e {
44
- static attach(t) {__margoAssertCore(t,__margoCoreRequirement("0.1.0",import.meta.url));
44
+ static attach(t) {__margoAssertCore(t,__margoCoreRequirement("1.0.0",import.meta.url));
45
45
  return new e(t);
46
46
  }
47
47
  constructor(e) {
@@ -1,4 +1,4 @@
1
- // @margo/core-built 0.1.0
1
+ // @margo/core-built 1.0.0
2
2
  import {coreRequirement as __margoCoreRequirement,assertCore as __margoAssertCore} from '@margoengine/core/extension';
3
3
 
4
4
  import { MargoError as e } from "@margoengine/math/errors";
@@ -195,7 +195,7 @@ function f(e, t) {
195
195
  let n = this[o];
196
196
  n.stats.dispatches++, n.indirect.call(this, e, t);
197
197
  }
198
- var p = {}, m = Symbol("render pass"), h = Symbol("compute pass"), g = Symbol("finish"), _ = Symbol("frame profiler"), v = class t {coreRequirement=__margoCoreRequirement("0.1.0",import.meta.url);
198
+ var p = {}, m = Symbol("render pass"), h = Symbol("compute pass"), g = Symbol("finish"), _ = Symbol("frame profiler"), v = class t {coreRequirement=__margoCoreRequirement("1.0.0",import.meta.url);
199
199
  get gpuSampleId() {
200
200
  return this.completedGPU;
201
201
  }
@@ -227,7 +227,7 @@ var p = {}, m = Symbol("render pass"), h = Symbol("compute pass"), g = Symbol("f
227
227
  key() {
228
228
  return `${this.ticks} ${this.fps} ${this.frameTime} ${this.drawCalls} ${this.dispatches} ${this.gpuTime} ${this.gpuElapsedMilliseconds} ${this.profiler?.supported} ${!this.profiler} ${this.profiling}`;
229
229
  }
230
- static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("0.1.0",import.meta.url));
230
+ static attach(e, n = {}) {__margoAssertCore(e,__margoCoreRequirement("1.0.0",import.meta.url));
231
231
  let r = new t(n);
232
232
  try {
233
233
  return e.use(r), r;
package/package.json CHANGED
@@ -1,82 +1,82 @@
1
- {
2
- "name": "@margoengine/stats",
3
- "version": "0.1.0",
4
- "description": "Allocation-free frame samples, DOM performance overlay, optional WebGPU timestamp profiling, pipeline compile tracking, a CPU phase breakdown, leak alerts and field telemetry.",
5
- "keywords": [
6
- "margoengine",
7
- "webgpu",
8
- "3d",
9
- "stats"
10
- ],
11
- "homepage": "https://margoengine.com",
12
- "bugs": {
13
- "url": "https://github.com/scottcampbelldata/margoengine/issues"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://github.com/scottcampbelldata/margoengine.git",
18
- "directory": "packages/stats"
19
- },
20
- "license": "Apache-2.0",
21
- "author": "Scott Campbell",
22
- "type": "module",
23
- "sideEffects": false,
24
- "exports": {
25
- ".": {
26
- "types": "./dist/index.d.ts",
27
- "import": "./dist/index.js"
28
- },
29
- "./beacon": {
30
- "types": "./dist/beacon.d.ts",
31
- "import": "./dist/beacon.js"
32
- },
33
- "./compile": {
34
- "types": "./dist/compile.d.ts",
35
- "import": "./dist/compile.js"
36
- },
37
- "./leaks": {
38
- "types": "./dist/leaks.d.ts",
39
- "import": "./dist/leaks.js"
40
- },
41
- "./phases": {
42
- "types": "./dist/phases.d.ts",
43
- "import": "./dist/phases.js"
44
- },
45
- "./report": {
46
- "types": "./dist/report.d.ts",
47
- "import": "./dist/report.js"
48
- },
49
- "./geometry": {
50
- "types": "./dist/geometry.d.ts",
51
- "import": "./dist/geometry.js"
52
- },
53
- "./gl": {
54
- "types": "./dist/gl.d.ts",
55
- "import": "./dist/gl.js"
56
- },
57
- "./panels": {
58
- "types": "./dist/panels.d.ts",
59
- "import": "./dist/panels.js"
60
- }
61
- },
62
- "files": [
63
- "dist",
64
- "LICENSE",
65
- "NOTICE"
66
- ],
67
- "publishConfig": {
68
- "access": "public"
69
- },
70
- "peerDependencies": {
71
- "@margoengine/core": "^0.1.0"
72
- },
73
- "dependencies": {
74
- "@margoengine/math": "^0.1.0"
75
- },
76
- "scripts": {
77
- "build": "node ../../scripts/build-optional.js stats",
78
- "test": "npm run build && node --test test/*.test.js",
79
- "test:browser": "npm run build && node ../../scripts/test-stats-browser.mjs",
80
- "prepack": "npm run build"
81
- }
82
- }
1
+ {
2
+ "name": "@margoengine/stats",
3
+ "version": "1.0.0",
4
+ "description": "Allocation-free frame samples, DOM performance overlay, optional WebGPU timestamp profiling, pipeline compile tracking, a CPU phase breakdown, leak alerts and field telemetry.",
5
+ "keywords": [
6
+ "margoengine",
7
+ "webgpu",
8
+ "3d",
9
+ "stats"
10
+ ],
11
+ "homepage": "https://margoengine.com",
12
+ "bugs": {
13
+ "url": "https://github.com/scottcampbelldata/margoengine/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/scottcampbelldata/margoengine.git",
18
+ "directory": "packages/stats"
19
+ },
20
+ "license": "Apache-2.0",
21
+ "author": "Scott Campbell",
22
+ "type": "module",
23
+ "sideEffects": false,
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
28
+ },
29
+ "./beacon": {
30
+ "types": "./dist/beacon.d.ts",
31
+ "import": "./dist/beacon.js"
32
+ },
33
+ "./compile": {
34
+ "types": "./dist/compile.d.ts",
35
+ "import": "./dist/compile.js"
36
+ },
37
+ "./leaks": {
38
+ "types": "./dist/leaks.d.ts",
39
+ "import": "./dist/leaks.js"
40
+ },
41
+ "./phases": {
42
+ "types": "./dist/phases.d.ts",
43
+ "import": "./dist/phases.js"
44
+ },
45
+ "./report": {
46
+ "types": "./dist/report.d.ts",
47
+ "import": "./dist/report.js"
48
+ },
49
+ "./geometry": {
50
+ "types": "./dist/geometry.d.ts",
51
+ "import": "./dist/geometry.js"
52
+ },
53
+ "./gl": {
54
+ "types": "./dist/gl.d.ts",
55
+ "import": "./dist/gl.js"
56
+ },
57
+ "./panels": {
58
+ "types": "./dist/panels.d.ts",
59
+ "import": "./dist/panels.js"
60
+ }
61
+ },
62
+ "files": [
63
+ "dist",
64
+ "LICENSE",
65
+ "NOTICE"
66
+ ],
67
+ "publishConfig": {
68
+ "access": "public"
69
+ },
70
+ "peerDependencies": {
71
+ "@margoengine/core": "^1.0.0"
72
+ },
73
+ "dependencies": {
74
+ "@margoengine/math": "^1.0.0"
75
+ },
76
+ "scripts": {
77
+ "build": "node ../../scripts/build-optional.js stats",
78
+ "test": "npm run build && node --test test/*.test.js",
79
+ "test:browser": "npm run build && node ../../scripts/test-stats-browser.mjs",
80
+ "prepack": "npm run build"
81
+ }
82
+ }