@sentio/runtime 2.40.0-rc.30 → 2.40.0-rc.31
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.
@@ -59816,13 +59816,16 @@ var _StoreContext = class {
|
|
59816
59816
|
const timeout = setTimeout(() => {
|
59817
59817
|
this.sendBatch();
|
59818
59818
|
}, STORE_BATCH_IDLE);
|
59819
|
+
const start = Date.now();
|
59819
59820
|
this.upsertBatch = {
|
59820
59821
|
opId,
|
59821
59822
|
request: req,
|
59822
59823
|
promise,
|
59823
59824
|
timer: timeout
|
59824
59825
|
};
|
59825
|
-
return promise
|
59826
|
+
return promise.finally(() => {
|
59827
|
+
request_times["upsert"].add(Date.now() - start);
|
59828
|
+
});
|
59826
59829
|
}
|
59827
59830
|
}
|
59828
59831
|
sendBatch() {
|
package/lib/index.js
CHANGED
package/lib/processor-runner.js
CHANGED
package/package.json
CHANGED
package/src/db-context.ts
CHANGED
@@ -167,14 +167,17 @@ export class StoreContext {
|
|
167
167
|
this.sendBatch()
|
168
168
|
}, STORE_BATCH_IDLE)
|
169
169
|
|
170
|
+
const start = Date.now()
|
170
171
|
this.upsertBatch = {
|
171
172
|
opId,
|
172
173
|
request: req,
|
173
174
|
promise,
|
174
|
-
timer: timeout
|
175
|
+
timer: timeout,
|
175
176
|
}
|
176
177
|
|
177
|
-
return promise
|
178
|
+
return promise.finally(() => {
|
179
|
+
request_times['upsert'].add(Date.now() - start)
|
180
|
+
})
|
178
181
|
}
|
179
182
|
}
|
180
183
|
|