repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docs: update benchmarks vs. external pools
[poolifier.git]
/
src
/
pools
/
selection-strategies
/
interleaved-weighted-round-robin-worker-choice-strategy.ts
diff --git
a/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts
b/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts
index e5370428409c337be5b81772eacf5f80a03576f1..86a7f5ca8f801c6b5e98dc380e9ee5dea80d37e3 100644
(file)
--- a/
src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts
@@
-4,7
+4,6
@@
import { DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS } from '../../utils'
import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
import type {
IWorkerChoiceStrategy,
import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
import type {
IWorkerChoiceStrategy,
- StrategyPolicy,
WorkerChoiceStrategyOptions
} from './selection-strategies-types'
WorkerChoiceStrategyOptions
} from './selection-strategies-types'
@@
-22,12
+21,6
@@
export class InterleavedWeightedRoundRobinWorkerChoiceStrategy<
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
implements IWorkerChoiceStrategy {
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
implements IWorkerChoiceStrategy {
- /** @inheritDoc */
- public readonly strategyPolicy: StrategyPolicy = {
- dynamicWorkerUsage: false,
- dynamicWorkerReady: true
- }
-
/**
* Round id.
* This is used to determine the current round weight.
/**
* Round id.
* This is used to determine the current round weight.
@@
-55,7
+48,7
@@
export class InterleavedWeightedRoundRobinWorkerChoiceStrategy<
/** @inheritDoc */
public reset (): boolean {
/** @inheritDoc */
public reset (): boolean {
- this.
nextWorkerNodeKey = 0
+ this.
resetWorkerNodeKeyProperties()
this.roundId = 0
return true
}
this.roundId = 0
return true
}
@@
-67,7
+60,7
@@
export class InterleavedWeightedRoundRobinWorkerChoiceStrategy<
/** @inheritDoc */
public choose (): number | undefined {
/** @inheritDoc */
public choose (): number | undefined {
- let roundId
: number = this.roundId
+ let roundId
!: number
let workerNodeId: number | undefined
for (
let roundIndex = this.roundId;
let workerNodeId: number | undefined
for (
let roundIndex = this.roundId;