99e29fcb6bd57c1bc0806b9778a7502933707c86
[e-mobility-charging-stations-simulator.git] / src / worker / WorkerConstants.ts
1 import { availableParallelism } from 'poolifier';
2
3 export class WorkerConstants {
4 public static readonly EMPTY_FUNCTION = Object.freeze(() => {
5 /* This is intentional */
6 });
7
8 public static readonly DEFAULT_ELEMENT_START_DELAY = 0;
9 public static readonly DEFAULT_WORKER_START_DELAY = 500;
10 public static readonly POOL_MAX_INACTIVE_TIME = 60000;
11 public static readonly DEFAULT_POOL_MIN_SIZE = availableParallelism() / 2;
12 public static readonly DEFAULT_POOL_MAX_SIZE = availableParallelism();
13 public static readonly DEFAULT_ELEMENTS_PER_WORKER = 1;
14
15 private constructor() {
16 // This is intentional
17 }
18 }