querysub 0.463.0 → 0.465.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.463.0",
3
+ "version": "0.465.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -693,7 +693,8 @@ registerGetSpecForChildPath(path => {
693
693
 
694
694
  if (!remoteWatcher.hasAnyDirectPathWatches(path)) {
695
695
  // NOTE: This might mean that our Path Watcher and remote watcher are out of sync, which is a big problem and will break things.
696
- console.error(`We do not own a path, but also aren't watching it on a remote, but... receive the value? This is weird, and will probably break things (we will likely ignore this value / not trigger parent watches for it).`, { path });
696
+ // NOTE: Actually... this probably just means the real authority JUST disconnected, and we still had some trailing reads.
697
+ console.warn(`We do not own a path, but also aren't watching it on a remote, but... we received the value? This is weird, and will probably break things (we will likely ignore this value / not trigger parent watches for it).`, { path });
697
698
  }
698
699
  }
699
700
  return authorityLookup.getOurSpec();
@@ -89,7 +89,7 @@ export let ensureSubscribed = lazy(() => {
89
89
  }
90
90
  if (data.result.totalInternalLoopCount > 2) {
91
91
  statsData.callsWithCascadingRuns++;
92
- statsData.totalInternalRerunsForCascading += data.result.totalInternalLoopCount;
92
+ statsData.totalInternalRerunsForCascading += data.result.totalInternalLoopCount - 1;
93
93
  if (data.result.totalInternalLoopCount > statsData.maxInternalReruns) {
94
94
  statsData.maxInternalReruns = data.result.totalInternalLoopCount;
95
95
  }
@@ -116,8 +116,8 @@ export let ensureSubscribed = lazy(() => {
116
116
 
117
117
  let fnStats = statsData.perFunctionStats[data.functionId];
118
118
  fnStats.totalCalls++;
119
- fnStats.totalInternalReruns += data.result.totalInternalLoopCount;
120
- fnStats.totalFullReruns += data.result.outerLoopCount;
119
+ fnStats.totalInternalReruns += data.result.totalInternalLoopCount - 1;
120
+ fnStats.totalFullReruns += data.result.outerLoopCount - 1;
121
121
  addToStatsValue(fnStats.evalTimeStats, data.result.evalTime);
122
122
  addToStatsValue(fnStats.timeTakenStats, data.result.timeTaken);
123
123
  addToStatsValue(fnStats.totalTimeStats, data.result.totalTime);
@@ -127,7 +127,7 @@ export let ensureSubscribed = lazy(() => {
127
127
  }
128
128
  if (data.result.totalInternalLoopCount > 2) {
129
129
  fnStats.callsWithCascadingRuns++;
130
- fnStats.totalInternalRerunsForCascading += data.result.totalInternalLoopCount;
130
+ fnStats.totalInternalRerunsForCascading += data.result.totalInternalLoopCount - 1;
131
131
  if (data.result.totalInternalLoopCount > fnStats.maxInternalReruns) {
132
132
  fnStats.maxInternalReruns = data.result.totalInternalLoopCount;
133
133
  }
@@ -142,22 +142,22 @@ export function getQuerysubStatsSync(): StatDefinition[] {
142
142
  getFnValue: fn => fn.totalCalls,
143
143
  }),
144
144
  makeCallStatSync({
145
- perFn, category: "Calls", title: "Rejected calls (full reruns)", emoji: "⚠️",
145
+ perFn, category: "Calls", title: "Rejected reruns", emoji: "⚠️",
146
146
  threshold: 10,
147
- getFnValue: fn => fn.totalFullReruns - fn.totalCalls,
147
+ getFnValue: fn => fn.totalFullReruns,
148
148
  }),
149
149
  makeCallStatSync({
150
- perFn, category: "Calls", title: "Total internal reruns", emoji: "♻️",
150
+ perFn, category: "Calls", title: "Rerun to sync data", emoji: "♻️",
151
151
  threshold: 10,
152
- getFnValue: fn => fn.totalInternalReruns - fn.totalCalls,
152
+ getFnValue: fn => fn.totalInternalReruns,
153
153
  }),
154
154
  makeCallStatSync({
155
- perFn, category: "Calls", title: "Calls with multiple internal runs", emoji: "🔦",
155
+ perFn, category: "Calls", title: "Calls with multiple resyncs", emoji: "🔦",
156
156
  threshold: 10,
157
157
  getFnValue: fn => fn.callsWithMultipleInternalRuns,
158
158
  }),
159
159
  makeCallStatSync({
160
- perFn, category: "Calls", title: "Calls needing cascading syncing", emoji: "📈",
160
+ perFn, category: "Calls", title: "Calls with multiple rejections", emoji: "📈",
161
161
  threshold: 10,
162
162
  getFnValue: fn => fn.callsWithCascadingRuns,
163
163
  }),