@nsshunt/stsinstrumentmanagerclient 1.0.12 → 1.0.14
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/index.cjs
CHANGED
|
@@ -149,12 +149,11 @@ class RequestLoggerMiddleware extends stsutils.STSOptionsBase {
|
|
|
149
149
|
"UpdateInstrument_AR_DEC"
|
|
150
150
|
/* UpdateInstrument_AR_DEC */
|
|
151
151
|
);
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
timeInMs = (end[0] * 1e9 + end[1]) / 1e6;
|
|
155
|
-
timeInMs = parseFloat(timeInMs.toFixed(4));
|
|
152
|
+
const end = performance.now() - start;
|
|
153
|
+
const timeInMs = parseFloat(end.toFixed(4));
|
|
156
154
|
this.#tinyEmitter.emit("UpdateInstrument_DH_VAL", timeInMs);
|
|
157
155
|
this.#tinyEmitter.emit("UpdateInstrument_D_VAL", timeInMs);
|
|
156
|
+
console.log(`-->>ZZZ: ${timeInMs}`);
|
|
158
157
|
};
|
|
159
158
|
// https://stackoverflow.com/questions/18031839/how-to-use-process-hrtime-to-get-execution-time-of-async-function/18031945
|
|
160
159
|
/**
|
|
@@ -172,7 +171,7 @@ class RequestLoggerMiddleware extends stsutils.STSOptionsBase {
|
|
|
172
171
|
if (this.options.ignoresocketio && req.originalUrl.includes("socket.io")) {
|
|
173
172
|
return;
|
|
174
173
|
}
|
|
175
|
-
const start =
|
|
174
|
+
const start = performance.now();
|
|
176
175
|
this.#tinyEmitter.emit(
|
|
177
176
|
"UpdateInstrument_AR_INC"
|
|
178
177
|
/* UpdateInstrument_AR_INC */
|