repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf: use optimized circular buffer implementation to store measurements history
[poolifier.git]
/
tests
/
pools
/
selection-strategies
/
selection-strategies.test.mjs
diff --git
a/tests/pools/selection-strategies/selection-strategies.test.mjs
b/tests/pools/selection-strategies/selection-strategies.test.mjs
index e4d1dd07ece0a5aeb8702a31c5386eb45d468ae0..3f2f2e81cf5b41bb4122adbda737b9b086ebd511 100644
(file)
--- a/
tests/pools/selection-strategies/selection-strategies.test.mjs
+++ b/
tests/pools/selection-strategies/selection-strategies.test.mjs
@@
-2,7
+2,7
@@
import { randomInt } from 'node:crypto'
import { expect } from 'expect'
import { expect } from 'expect'
-import { Circular
Array } from '../../../lib/circular-array
.cjs'
+import { Circular
Buffer } from '../../../lib/circular-buffer
.cjs'
import {
DynamicClusterPool,
DynamicThreadPool,
import {
DynamicClusterPool,
DynamicThreadPool,
@@
-258,17
+258,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: {
failed: 0
},
runTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
waitTime: {
},
waitTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
elu: {
idle: {
},
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-314,17
+314,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: {
failed: 0
},
runTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
waitTime: {
},
waitTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
elu: {
idle: {
},
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-532,17
+532,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: {
failed: 0
},
runTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
waitTime: {
},
waitTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
elu: {
idle: {
},
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-591,17
+591,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: {
failed: 0
},
runTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
waitTime: {
},
waitTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
elu: {
idle: {
},
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-731,17
+731,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: {
idle: {
}),
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-800,17
+800,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: {
idle: {
}),
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-950,17
+950,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: {
failed: 0
},
runTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
waitTime: {
},
waitTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
elu: expect.objectContaining({
idle: expect.objectContaining({
},
elu: expect.objectContaining({
idle: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
active: expect.objectContaining({
}),
active: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
})
})
})
})
})
})
@@
-1025,17
+1025,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: {
failed: 0
},
runTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
waitTime: {
},
waitTime: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
elu: expect.objectContaining({
idle: expect.objectContaining({
},
elu: expect.objectContaining({
idle: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
active: expect.objectContaining({
}),
active: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
})
})
})
})
})
})
@@
-1181,17
+1181,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: expect.objectContaining({
idle: expect.objectContaining({
}),
elu: expect.objectContaining({
idle: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
active: expect.objectContaining({
}),
active: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
})
})
})
})
})
})
@@
-1277,17
+1277,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: expect.objectContaining({
idle: expect.objectContaining({
}),
elu: expect.objectContaining({
idle: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
active: expect.objectContaining({
}),
active: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
})
})
})
})
})
})
@@
-1378,17
+1378,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: expect.objectContaining({
idle: expect.objectContaining({
}),
elu: expect.objectContaining({
idle: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
active: expect.objectContaining({
}),
active: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
})
})
})
})
})
})
@@
-1589,17
+1589,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: {
idle: {
}),
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-1673,17
+1673,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: {
idle: {
}),
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-1762,17
+1762,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: {
idle: {
}),
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-2000,17
+2000,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: {
idle: {
}),
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})
@@
-2104,17
+2104,17
@@
describe('Selection strategies test suite', () => {
failed: 0
},
runTime: expect.objectContaining({
failed: 0
},
runTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
waitTime: expect.objectContaining({
}),
waitTime: expect.objectContaining({
- history: expect.any(Circular
Array
)
+ history: expect.any(Circular
Buffer
)
}),
elu: {
idle: {
}),
elu: {
idle: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
},
active: {
},
active: {
- history:
new CircularArray(
)
+ history:
expect.any(CircularBuffer
)
}
}
})
}
}
})