@m4l/gclick-realtime 1.1.0 → 1.2.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.
Files changed (62) hide show
  1. package/contracts/deviceData.d.ts +1 -1
  2. package/contracts/deviceData.d.ts.map +1 -1
  3. package/contracts/deviceDetail.d.ts +0 -1
  4. package/contracts/deviceDetail.d.ts.map +1 -1
  5. package/dummy/catalogs/baseDeviceTemplate.d.ts +1 -1
  6. package/dummy/catalogs/baseDeviceTemplate.d.ts.map +1 -1
  7. package/dummy/catalogs/scenarios.d.ts +46 -46
  8. package/dummy/catalogs/scenarios.js +46 -46
  9. package/dummy/runtime/dummy.d.ts.map +1 -1
  10. package/dummy/runtime/dummy.js +11 -10
  11. package/dummy/runtime/simulation.d.ts +2 -1
  12. package/dummy/runtime/simulation.d.ts.map +1 -1
  13. package/dummy/runtime/simulation.js +384 -361
  14. package/dummy/shared/types.d.ts +1 -1
  15. package/dummy/shared/types.d.ts.map +1 -1
  16. package/package.json +1 -1
  17. package/payload/index.d.ts +1 -0
  18. package/payload/index.d.ts.map +1 -1
  19. package/payload/index.js +7 -4
  20. package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts +10 -0
  21. package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts.map +1 -0
  22. package/payload/mergeDevicePayloadWithUpdatedAtGuard.js +50 -0
  23. package/web/consumer/RealTimeConsumerContext.d.ts.map +1 -1
  24. package/web/consumer/RealTimeConsumerContext.js +59 -30
  25. package/web/consumer/store.d.ts +1 -0
  26. package/web/consumer/store.d.ts.map +1 -1
  27. package/web/consumer/store.helpers.d.ts +24 -2
  28. package/web/consumer/store.helpers.d.ts.map +1 -1
  29. package/web/consumer/store.helpers.js +61 -33
  30. package/web/consumer/store.js +176 -60
  31. package/web/consumer/types.d.ts +3 -2
  32. package/web/consumer/types.d.ts.map +1 -1
  33. package/web/host/devicesResourceType.d.ts +70 -0
  34. package/web/host/devicesResourceType.d.ts.map +1 -0
  35. package/web/host/devicesResourceType.js +196 -0
  36. package/web/host/hostRuntime.d.ts +7 -0
  37. package/web/host/hostRuntime.d.ts.map +1 -1
  38. package/web/host/hostRuntime.js +44 -28
  39. package/web/host/index.d.ts +5 -2
  40. package/web/host/index.d.ts.map +1 -1
  41. package/web/host/launchContract.d.ts +25 -5
  42. package/web/host/launchContract.d.ts.map +1 -1
  43. package/web/host/launchContract.js +78 -41
  44. package/web/host/startupSnapshots.d.ts +32 -0
  45. package/web/host/startupSnapshots.d.ts.map +1 -0
  46. package/web/host/startupSnapshots.js +50 -0
  47. package/web/index.js +53 -47
  48. package/web/producer/sourceDataFactory.d.ts +3 -3
  49. package/web/producer/sourceDataFactory.d.ts.map +1 -1
  50. package/web/producer/sourceDataFactory.js +25 -21
  51. package/web/runtime/resourceTypeMergeStrategies.d.ts +10 -0
  52. package/web/runtime/resourceTypeMergeStrategies.d.ts.map +1 -0
  53. package/web/runtime/resourceTypeMergeStrategies.js +19 -0
  54. package/web/runtime/runtime.d.ts.map +1 -1
  55. package/web/runtime/runtime.js +15 -9
  56. package/web/runtime/runtimeAtmosphereOnly.d.ts.map +1 -1
  57. package/web/runtime/runtimeAtmosphereOnly.js +18 -12
  58. package/web/shared/performanceMetrics.d.ts +18 -2
  59. package/web/shared/performanceMetrics.d.ts.map +1 -1
  60. package/web/shared/performanceMetrics.js +35 -20
  61. package/web/shared/runtimeTypes.d.ts +2 -2
  62. package/web/shared/runtimeTypes.d.ts.map +1 -1
@@ -0,0 +1,19 @@
1
+ import { mergeDevicePayloadWithUpdatedAtGuard as t } from "../../payload/mergeDevicePayloadWithUpdatedAtGuard.js";
2
+ import { EnumResourceTypesIds as a } from "../shared/constants.js";
3
+ const o = {
4
+ [a.devices]: t
5
+ };
6
+ function u(e) {
7
+ const r = o[e.resourceTypeId];
8
+ return !r || e.mergePayloadStrategy ? e : {
9
+ ...e,
10
+ mergePayloadStrategy: r
11
+ };
12
+ }
13
+ function y(e) {
14
+ return e.map(u);
15
+ }
16
+ export {
17
+ y as withGClickResourceTypeMergeStrategies,
18
+ u as withGClickResourceTypeMergeStrategy
19
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/runtime/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,YAAY,EACV,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,KAAK,EAAE,yBAAyB,CAAC;IACjC,KAAK,EAAE,qBAAqB,CAAC;CAC9B;AAqBD;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,0BAA0B,GAChC,qBAAqB,CAUvB"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/runtime/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AAKnC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAKnE,YAAY,EACV,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,KAAK,EAAE,yBAAyB,CAAC;IACjC,KAAK,EAAE,qBAAqB,CAAC;CAC9B;AAyBD;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,0BAA0B,GAChC,qBAAqB,CAevB"}
@@ -1,22 +1,28 @@
1
1
  import { SourceDataFactory as o } from "../producer/sourceDataFactory.js";
2
2
  import { createRealtimeRuntimeBundle as c } from "@m4l/realtime-runtime/web";
3
- import { recordRealtimePerformanceMetric as n } from "../shared/performanceMetrics.js";
4
- function a(e) {
5
- return (r, t) => {
6
- n(r, t), e?.(r, t);
7
- };
3
+ import { isRealtimePerformanceMetricsEnabled as i, recordRealtimePerformanceMetric as n } from "../shared/performanceMetrics.js";
4
+ import { withGClickResourceTypeMergeStrategies as a } from "./resourceTypeMergeStrategies.js";
5
+ function m(e) {
6
+ if (!(!e && !i()))
7
+ return (r, t) => {
8
+ n(r, t), e?.(r, t);
9
+ };
8
10
  }
9
- function u(e) {
11
+ function s(e) {
12
+ const r = a(
13
+ e.resourceTypesConfig
14
+ );
10
15
  return c(
11
16
  {
12
17
  ...e,
13
- onPerformanceMetric: a(
18
+ resourceTypesConfig: r,
19
+ onPerformanceMetric: m(
14
20
  e.onPerformanceMetric
15
21
  )
16
22
  },
17
- o.createSourceData
23
+ o.createSourceDataFactory()
18
24
  );
19
25
  }
20
26
  export {
21
- u as createRealtimeRuntime
27
+ s as createRealtimeRuntime
22
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"runtimeAtmosphereOnly.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/runtime/runtimeAtmosphereOnly.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,+CAA+C,EAChD,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvD,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,0BAA0B,EAC1B,qBAAqB,CACtB,GAAG;IACF,mBAAmB,EAAE,+CAA+C,EAAE,CAAC;CACxE,CAAC;AAqBF;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,oCAAoC,GAC1C,qBAAqB,CAUvB"}
1
+ {"version":3,"file":"runtimeAtmosphereOnly.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/runtime/runtimeAtmosphereOnly.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,+CAA+C,EAChD,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAKvD,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,0BAA0B,EAC1B,qBAAqB,CACtB,GAAG;IACF,mBAAmB,EAAE,+CAA+C,EAAE,CAAC;CACxE,CAAC;AAyBF;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,oCAAoC,GAC1C,qBAAqB,CAevB"}
@@ -1,22 +1,28 @@
1
- import { createAtmosphereSourceData as o } from "@m4l/realtime-runtime";
2
- import { createRealtimeRuntimeBundle as c } from "@m4l/realtime-runtime/web";
3
- import { recordRealtimePerformanceMetric as m } from "../shared/performanceMetrics.js";
4
- function n(e) {
5
- return (r, t) => {
6
- m(r, t), e?.(r, t);
7
- };
1
+ import { createAtmosphereSourceDataFactory as o } from "@m4l/realtime-runtime";
2
+ import { createRealtimeRuntimeBundle as i } from "@m4l/realtime-runtime/web";
3
+ import { isRealtimePerformanceMetricsEnabled as c, recordRealtimePerformanceMetric as n } from "../shared/performanceMetrics.js";
4
+ import { withGClickResourceTypeMergeStrategies as m } from "./resourceTypeMergeStrategies.js";
5
+ function a(e) {
6
+ if (!(!e && !c()))
7
+ return (r, t) => {
8
+ n(r, t), e?.(r, t);
9
+ };
8
10
  }
9
- function u(e) {
10
- return c(
11
+ function l(e) {
12
+ const r = m(
13
+ e.resourceTypesConfig
14
+ );
15
+ return i(
11
16
  {
12
17
  ...e,
13
- onPerformanceMetric: n(
18
+ resourceTypesConfig: r,
19
+ onPerformanceMetric: a(
14
20
  e.onPerformanceMetric
15
21
  )
16
22
  },
17
- o
23
+ o()
18
24
  );
19
25
  }
20
26
  export {
21
- u as createAtmosphereRealtimeRuntime
27
+ l as createAtmosphereRealtimeRuntime
22
28
  };
@@ -1,18 +1,26 @@
1
- type RealtimePerformanceMetricId = 'producerIncomingBatch' | 'producerDrainSet' | 'consumerIncomingBatch' | 'consumerDrainSet';
1
+ import { RealTimeProducerMetricName } from '@m4l/realtime-runtime';
2
+ type RealtimePerformanceMetricId = RealTimeProducerMetricName | 'consumerActiveStoreCount' | 'consumerActiveSubscriptionCount' | 'consumerIncomingBatch' | 'consumerDrainSet' | 'consumerQueueLength' | 'consumerResourceCount' | 'consumerSnapshotResourceCount' | 'consumerSnapshotApplyDurationMs' | 'consumerSnapshotChunkCount' | 'consumerSnapshotChunkSize' | 'consumerSnapshotYieldCount' | 'consumerApplyNotifyDurationMs' | 'consumerProcessDurationMs';
2
3
  interface RealtimePerformanceMetric {
3
4
  lastBatchSize: number;
4
5
  lastEventAt: number;
6
+ lastValue: number;
5
7
  lastWindowDurationMs: number;
6
8
  perSecondCount: number;
7
9
  perSecondItems: number;
8
10
  perSecondMaxBatchSize: number;
11
+ perSecondMaxValue: number;
12
+ perSecondValue: number;
9
13
  totalCount: number;
10
14
  totalItems: number;
11
15
  totalMaxBatchSize: number;
16
+ totalMaxValue: number;
17
+ totalValue: number;
12
18
  windowCount: number;
13
19
  windowItems: number;
14
20
  windowMaxBatchSize: number;
21
+ windowMaxValue: number;
15
22
  windowStartedAt: number;
23
+ windowValue: number;
16
24
  }
17
25
  interface RealtimePerformanceDebugState {
18
26
  metrics: Partial<Record<RealtimePerformanceMetricId, RealtimePerformanceMetric>>;
@@ -21,9 +29,17 @@ interface RealtimePerformanceDebugState {
21
29
  declare global {
22
30
  var __M4L_REALTIME_PERFORMANCE__: RealtimePerformanceDebugState | undefined;
23
31
  }
32
+ /**
33
+ * Return whether browser-readable realtime debug metrics are enabled for this build.
34
+ */
35
+ export declare function isRealtimePerformanceMetricsEnabled(): boolean;
36
+ /**
37
+ * Read a monotonic timestamp for local duration metrics.
38
+ */
39
+ export declare function getRealtimePerformanceNowMs(): number;
24
40
  /**
25
41
  * Record one realtime performance sample that can be inspected from the browser console.
26
42
  */
27
- export declare function recordRealtimePerformanceMetric(metricId: RealtimePerformanceMetricId, batchSize?: number): void;
43
+ export declare function recordRealtimePerformanceMetric(metricId: RealtimePerformanceMetricId, value?: number): void;
28
44
  export {};
29
45
  //# sourceMappingURL=performanceMetrics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"performanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/shared/performanceMetrics.ts"],"names":[],"mappings":"AAIA,KAAK,2BAA2B,GAC5B,uBAAuB,GACvB,kBAAkB,GAClB,uBAAuB,GACvB,kBAAkB,CAAC;AAEvB,UAAU,yBAAyB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,6BAA6B;IACrC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,yBAAyB,CAAC,CAAC,CAAC;IACjF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,4BAA4B,EAAE,6BAA6B,GAAG,SAAS,CAAC;CAC7E;AA2ED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,2BAA2B,EACrC,SAAS,SAAI,QA+Bd"}
1
+ {"version":3,"file":"performanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/shared/performanceMetrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAMxE,KAAK,2BAA2B,GAC5B,0BAA0B,GAC1B,0BAA0B,GAC1B,iCAAiC,GACjC,uBAAuB,GACvB,kBAAkB,GAClB,qBAAqB,GACrB,uBAAuB,GACvB,+BAA+B,GAC/B,iCAAiC,GACjC,4BAA4B,GAC5B,2BAA2B,GAC3B,4BAA4B,GAC5B,+BAA+B,GAC/B,2BAA2B,CAAC;AAEhC,UAAU,yBAAyB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,6BAA6B;IACrC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,yBAAyB,CAAC,CAAC,CAAC;IACjF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,4BAA4B,EAAE,6BAA6B,GAAG,SAAS,CAAC;CAC7E;AAOD;;GAEG;AACH,wBAAgB,mCAAmC,YAElD;AAED;;GAEG;AACH,wBAAgB,2BAA2B,WAI1C;AAoFD;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,2BAA2B,EACrC,KAAK,SAAI,QAqCV"}
@@ -1,50 +1,65 @@
1
- const E = typeof M4L_ENABLE_REALTIME_DEBUG_METRICS < "u" ? M4L_ENABLE_REALTIME_DEBUG_METRICS : !1;
2
- function M(t) {
1
+ const M = typeof M4L_ENABLE_REALTIME_DEBUG_METRICS < "u" ? M4L_ENABLE_REALTIME_DEBUG_METRICS : !1;
2
+ function E() {
3
+ return M;
4
+ }
5
+ function _() {
6
+ return typeof globalThis.performance?.now == "function" ? globalThis.performance.now() : Date.now();
7
+ }
8
+ function w(a) {
3
9
  return {
4
10
  lastBatchSize: 0,
5
- lastEventAt: t,
11
+ lastEventAt: a,
12
+ lastValue: 0,
6
13
  lastWindowDurationMs: 1e3,
7
14
  perSecondCount: 0,
8
15
  perSecondItems: 0,
9
16
  perSecondMaxBatchSize: 0,
17
+ perSecondMaxValue: 0,
18
+ perSecondValue: 0,
10
19
  totalCount: 0,
11
20
  totalItems: 0,
12
21
  totalMaxBatchSize: 0,
22
+ totalMaxValue: 0,
23
+ totalValue: 0,
13
24
  windowCount: 0,
14
25
  windowItems: 0,
15
26
  windowMaxBatchSize: 0,
16
- windowStartedAt: t
27
+ windowMaxValue: 0,
28
+ windowStartedAt: a,
29
+ windowValue: 0
17
30
  };
18
31
  }
19
- function _(t, a) {
20
- const o = a - t.windowStartedAt;
21
- o < 1e3 || (t.perSecondCount = t.windowCount, t.perSecondItems = t.windowItems, t.perSecondMaxBatchSize = t.windowMaxBatchSize, t.lastWindowDurationMs = o, t.windowCount = 0, t.windowItems = 0, t.windowMaxBatchSize = 0, t.windowStartedAt = a);
32
+ function u(a, i) {
33
+ const t = i - a.windowStartedAt;
34
+ t < 1e3 || (a.perSecondCount = a.windowCount, a.perSecondItems = a.windowItems, a.perSecondMaxBatchSize = a.windowMaxBatchSize, a.perSecondValue = a.windowValue, a.perSecondMaxValue = a.windowMaxValue, a.lastWindowDurationMs = t, a.windowCount = 0, a.windowItems = 0, a.windowMaxBatchSize = 0, a.windowValue = 0, a.windowMaxValue = 0, a.windowStartedAt = i);
22
35
  }
23
- function r(t) {
24
- return !Number.isFinite(t) || t < 1 ? 1 : Math.floor(t);
36
+ function d(a) {
37
+ return Number.isFinite(a) ? Math.max(0, a) : 1;
25
38
  }
26
- function d() {
27
- if (!E)
39
+ function r() {
40
+ if (!M)
28
41
  return;
29
- const t = Date.now();
42
+ const a = Date.now();
30
43
  return globalThis.__M4L_REALTIME_PERFORMANCE__ || (globalThis.__M4L_REALTIME_PERFORMANCE__ = {
31
44
  metrics: {},
32
- updatedAt: t
45
+ updatedAt: a
33
46
  }), globalThis.__M4L_REALTIME_PERFORMANCE__.metrics = globalThis.__M4L_REALTIME_PERFORMANCE__.metrics ?? {}, globalThis.__M4L_REALTIME_PERFORMANCE__;
34
47
  }
35
- function s(t, a = 1) {
36
- const o = d();
37
- if (!o)
48
+ function s(a, i = 1) {
49
+ const t = r();
50
+ if (!t)
38
51
  return;
39
- const i = Date.now(), n = r(a), e = o.metrics[t] ?? (o.metrics[t] = M(i));
40
- _(e, i), e.windowCount += 1, e.windowItems += n, e.windowMaxBatchSize = Math.max(
52
+ const l = Date.now(), o = d(i), n = Math.floor(Math.max(1, o)), e = t.metrics[a] ?? (t.metrics[a] = w(l));
53
+ u(e, l), e.windowCount += 1, e.windowItems += n, e.windowMaxBatchSize = Math.max(
41
54
  e.windowMaxBatchSize,
42
55
  n
43
- ), e.totalCount += 1, e.totalItems += n, e.totalMaxBatchSize = Math.max(
56
+ ), e.windowValue += o, e.windowMaxValue = Math.max(e.windowMaxValue, o), e.totalCount += 1, e.totalItems += n, e.totalMaxBatchSize = Math.max(
44
57
  e.totalMaxBatchSize,
45
58
  n
46
- ), e.lastBatchSize = n, e.lastEventAt = i, o.updatedAt = i;
59
+ ), e.totalValue += o, e.totalMaxValue = Math.max(e.totalMaxValue, o), e.lastBatchSize = n, e.lastValue = o, e.lastEventAt = l, t.updatedAt = l;
47
60
  }
48
61
  export {
62
+ _ as getRealtimePerformanceNowMs,
63
+ E as isRealtimePerformanceMetricsEnabled,
49
64
  s as recordRealtimePerformanceMetric
50
65
  };
@@ -1,4 +1,4 @@
1
- import { OnMessagesStoreCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessagePayload, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, RealTimeResourceTypeId, RealTimeStatus, SubscribeOptions, Subscriber } from '@m4l/realtime-runtime';
1
+ import { OnMessagesStoreCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeMessagePayload, RealTimeResourceMessageNormalizeContext, RealTimeResourceMessageNormalizeStrategy, RealTimeReadonlyResourceHash, RealTimeResourceMergeContext, RealTimeResourceSerialId, RealTimeResourcePayloadMergeStrategy, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, RealTimeResourceTypeId, RealTimeStatus, SubscribeOptions, Subscriber } from '@m4l/realtime-runtime';
2
2
  import { MessageQueueManager } from '../../../../../dist/packages/@m4l/realtime-runtime/web';
3
- export type { MessageQueueManager, OnMessagesStoreCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessagePayload, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, RealTimeResourceTypeId, RealTimeStatus, SubscribeOptions, Subscriber, };
3
+ export type { MessageQueueManager, OnMessagesStoreCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeMessagePayload, RealTimeResourceMessageNormalizeContext, RealTimeResourceMessageNormalizeStrategy, RealTimeReadonlyResourceHash, RealTimeResourceMergeContext, RealTimeResourcePayloadMergeStrategy, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, RealTimeResourceTypeId, RealTimeStatus, SubscribeOptions, Subscriber, };
4
4
  //# sourceMappingURL=runtimeTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtimeTypes.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/shared/runtimeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,eAAe,EACf,sBAAsB,EACtB,wBAAwB,EACxB,+CAA+C,EAC/C,yCAAyC,EACzC,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,eAAe,EACf,sBAAsB,EACtB,wBAAwB,EACxB,+CAA+C,EAC/C,yCAAyC,EACzC,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,UAAU,GACX,CAAC"}
1
+ {"version":3,"file":"runtimeTypes.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/shared/runtimeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,uCAAuC,EACvC,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,wBAAwB,EACxB,oCAAoC,EACpC,+CAA+C,EAC/C,yCAAyC,EACzC,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,iCAAiC,EACjC,mCAAmC,EACnC,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,uCAAuC,EACvC,wCAAwC,EACxC,4BAA4B,EAC5B,4BAA4B,EAC5B,oCAAoC,EACpC,wBAAwB,EACxB,+CAA+C,EAC/C,yCAAyC,EACzC,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,UAAU,GACX,CAAC"}