@torrent-tv/proxy 2.80.15 → 2.80.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -9
- package/docs/encode-architecture.md +88 -40
- package/package.json +1 -1
- package/services/encode/EncodePlan.js +1356 -1242
- package/test/move-cost.test.js +21 -14
package/test/move-cost.test.js
CHANGED
|
@@ -9,23 +9,30 @@
|
|
|
9
9
|
* position defines slides forward one number at a time, and every slide made
|
|
10
10
|
* standing one number behind it score worse than standing in it.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* THREE FAULTS IN THE ARITHMETIC, and no threshold anywhere. There was one for
|
|
13
|
+
* a while — "a move must beat staying by at least what moving costs" — and it
|
|
14
|
+
* was a prop under a comparison that was wrong rather than indifferent. It is
|
|
15
|
+
* gone.
|
|
13
16
|
*
|
|
14
|
-
* 1.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
+
* 1. **A body was charged a whole piece for the one it was already making.**
|
|
18
|
+
* `arrival = delay + (index - at + 1) / rate` is right for a body that does
|
|
19
|
+
* not exist yet and wrong for a run 0.8 s into a 0.9 s piece. `delaySec` is
|
|
20
|
+
* now when the body finishes the piece it STANDS ON, so from #58 reaching #59
|
|
21
|
+
* costs 0.14 + 0.94 = 1.08 s against 1.88 s for a kill and a cold start — a
|
|
22
|
+
* decision by eight hundred milliseconds, where the double charge had made it
|
|
23
|
+
* a coin flip lost by ten.
|
|
24
|
+
* 2. **The piece was priced at the unpenalised rate** while arrivals used the
|
|
25
|
+
* penalised one, so every extra body looked cheaper than it is and the plan
|
|
26
|
+
* bought a second encoder where one served. One rate, the one in force.
|
|
27
|
+
* 3. **`withinSeconds: null` was read through `Number()`**, where it is 0, so
|
|
28
|
+
* the film BEHIND the viewers was due immediately and was the most urgent
|
|
17
29
|
* material in the file. It bought encoders and it took the run standing in
|
|
18
30
|
* front of the viewer, because that run was the nearest body to it.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* reading only from a run that produced something and every run in a thrash
|
|
25
|
-
* is killed before it finishes anything.
|
|
26
|
-
* 4. A staying run was priced as though it would produce instantly, however
|
|
27
|
-
* recently it had started, so the score had no memory of a decision it was
|
|
28
|
-
* still carrying out.
|
|
31
|
+
*
|
|
32
|
+
* And what a move costs is `Infinity` until something has been measured, because
|
|
33
|
+
* a move is irreversible while leaving the encoder alone is always available. A
|
|
34
|
+
* run killed before producing anything is a measurement too — a lower bound on
|
|
35
|
+
* the first output — which is the only reading a thrash can supply.
|
|
29
36
|
*/
|
|
30
37
|
|
|
31
38
|
import test from "node:test";
|