fix: attribute replica CPU around pause to the unfrozen part
A sample interval that crosses docker pause or unpause carried the CPU spent before the pause and the burst after unpause into the failover window by proportional split. Use the pause and unpause moments from Docker events so that interval CPU lands outside the frozen span. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+7
-2
@@ -3178,6 +3178,7 @@ class Bench:
|
||||
# секунды часов ВМ) и ID вне стенда за весь прогон
|
||||
self.containers: dict[str, dict[str, str]] = {}
|
||||
self.starts: dict[str, list[float]] = {}
|
||||
self.frozen: dict[str, list[tuple[float, float]]] = {}
|
||||
self.unmapped: set[str] = set()
|
||||
|
||||
# ------------------------------------------------------------ вывод
|
||||
@@ -4603,11 +4604,14 @@ class Bench:
|
||||
`profile-resources`): разгон — 2 с с первого запроса, до действия,
|
||||
окно отказа до возврата, после возврата до последнего запроса.
|
||||
`docker start` после `stop` / `kill` — новая cgroup, её счёт идёт
|
||||
с момента возврата."""
|
||||
с момента возврата; `pause` … `unpause` — заморозка: CPU
|
||||
граничных интервалов — вне её."""
|
||||
first = min(r.start for r in requests)
|
||||
last = max(r.start for r in requests)
|
||||
self.check_observer(f"phase {phase}", first, last)
|
||||
if mode != "pause":
|
||||
if mode == "pause":
|
||||
self.frozen.setdefault(instance, []).append((action, back))
|
||||
else:
|
||||
self.starts.setdefault(instance, []).append(back)
|
||||
self.containers.update(self.stand.container_map())
|
||||
roles = {}
|
||||
@@ -4632,6 +4636,7 @@ class Bench:
|
||||
mode=mode,
|
||||
profile="failover",
|
||||
starts=self.starts,
|
||||
frozen=self.frozen,
|
||||
)
|
||||
self.observe(result, f"phase {phase}", "failover")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user