repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: use ramdba helper for builtin types
[e-mobility-charging-stations-simulator.git]
/
src
/
performance
/
PerformanceStatistics.ts
diff --git
a/src/performance/PerformanceStatistics.ts
b/src/performance/PerformanceStatistics.ts
index 6363be1c6b2196842b49dc1140ca9887d5b4b385..265cb6c963918b1a3970a95e5822742f3202c0d4 100644
(file)
--- a/
src/performance/PerformanceStatistics.ts
+++ b/
src/performance/PerformanceStatistics.ts
@@
-5,7
+5,7
@@
import type { URL } from 'node:url'
import { parentPort } from 'node:worker_threads'
import { secondsToMilliseconds } from 'date-fns'
import { parentPort } from 'node:worker_threads'
import { secondsToMilliseconds } from 'date-fns'
-import { mean, median } from 'rambda'
+import {
is,
mean, median } from 'rambda'
import { BaseError } from '../exception/index.js'
import {
import { BaseError } from '../exception/index.js'
import {
@@
-107,7
+107,7
@@
export class PerformanceStatistics {
try {
performance.measure(name, markId)
} catch (error) {
try {
performance.measure(name, markId)
} catch (error) {
- if (
error instanceof Error
&& error.message.includes('performance mark has not been set')) {
+ if (
is(Error, error)
&& error.message.includes('performance mark has not been set')) {
/* Ignore */
} else {
throw error
/* Ignore */
} else {
throw error