Skip to content

Commit

Permalink
Fix perf
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gu <[email protected]>
  • Loading branch information
tylergu committed Nov 4, 2023
1 parent d24c9a6 commit a7376ff
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions performance_measurement/measure_runner.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import json
import logging
import time
from typing import Callable, Tuple
from dataclasses import dataclass
from typing import Callable

import yaml
import kubernetes
import kubernetes.client.models as k8s_models
import yaml

from acto.common import kubernetes_client
from acto.kubectl_client.kubectl import KubectlClient
from acto.runner import Runner
from acto.serialization import ActoEncoder
from acto.snapshot import Snapshot
from acto.utils.thread_logger import get_thread_logger


ConditionFuncType = Callable[[dict, kubernetes.client.ApiClient, str], bool]


Expand Down Expand Up @@ -208,7 +206,7 @@ def wait_for_zk_spec(
if not port_matched:
continue

if input["spec"]["resources"]:
if "resources" in input["spec"] and input["spec"]["resources"]:
resource_matched = True
if "limits" in input["spec"]["resources"] and input["spec"]["resources"]["limits"]:
if "limits" not in sts_object["spec"]["template"]["spec"]["containers"][0]["resources"] or not sts_object["spec"]["template"]["spec"]["containers"][0]["resources"]["limits"]:
Expand Down

0 comments on commit a7376ff

Please sign in to comment.