repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: switch Date.now() -> performance.now() where appropriate
[poolifier.git]
/
src
/
pools
/
selection-strategies
/
abstract-worker-choice-strategy.ts
diff --git
a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts
b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts
index 332b3fc103bdffcd2e0339d1153651441d2c29da..8ab3d360ca67f210db221fcdd424039799cf6668 100644
(file)
--- a/
src/pools/selection-strategies/abstract-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/abstract-worker-choice-strategy.ts
@@
-17,13
+17,14
@@
export abstract class AbstractWorkerChoiceStrategy<
Worker extends IPoolWorker,
Data = unknown,
Response = unknown
Worker extends IPoolWorker,
Data = unknown,
Response = unknown
-> implements IWorkerChoiceStrategy
<Worker, Data, Response>
{
- /**
{@inheritDoc}
*/
- p
ublic
readonly isDynamicPool: boolean
- /**
{@inheritDoc}
*/
+> implements IWorkerChoiceStrategy {
+ /**
@inheritDoc
*/
+ p
rotected
readonly isDynamicPool: boolean
+ /**
@inheritDoc
*/
public requiredStatistics: RequiredStatistics = {
runTime: false,
public requiredStatistics: RequiredStatistics = {
runTime: false,
- avgRunTime: false
+ avgRunTime: false,
+ medRunTime: false
}
/**
}
/**
@@
-32,18
+33,18
@@
export abstract class AbstractWorkerChoiceStrategy<
* @param pool - The pool instance.
*/
public constructor (
* @param pool - The pool instance.
*/
public constructor (
- p
ublic
readonly pool: IPoolInternal<Worker, Data, Response>
+ p
rotected
readonly pool: IPoolInternal<Worker, Data, Response>
) {
this.isDynamicPool = this.pool.type === PoolType.DYNAMIC
this.choose.bind(this)
}
) {
this.isDynamicPool = this.pool.type === PoolType.DYNAMIC
this.choose.bind(this)
}
- /**
{@inheritDoc}
*/
+ /**
@inheritDoc
*/
public abstract reset (): boolean
public abstract reset (): boolean
- /**
{@inheritDoc}
*/
+ /**
@inheritDoc
*/
public abstract choose (): number
public abstract choose (): number
- /**
{@inheritDoc}
*/
+ /**
@inheritDoc
*/
public abstract remove (workerKey: number): boolean
}
public abstract remove (workerKey: number): boolean
}