Skip to content

Commit

Permalink
Remove web dashboard (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
parasj authored Jan 25, 2022
1 parent 116d3cf commit 73536c7
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function benchmark_config {
NUM_GATEWAYS=$2
# N_CHUNKS_PER_CONNECTION * NUM_CONNECTIONS
N_CHUNKS=$((N_CHUNKS_PER_CONNECTION * NUM_CONNECTIONS))
echo "skylark replicate-random $SRC_REGION $DST_REGION $INTER_REGION --chunk-size-mb $CHUNK_SIZE_MB --n-chunks $N_CHUNKS --num-gateways $NUM_GATEWAYS --num-outgoing-connections $NUM_CONNECTIONS --no-reuse-gateways --no-serve-web-dashboard"
echo "skylark replicate-random $SRC_REGION $DST_REGION $INTER_REGION --chunk-size-mb $CHUNK_SIZE_MB --n-chunks $N_CHUNKS --num-gateways $NUM_GATEWAYS --num-outgoing-connections $NUM_CONNECTIONS --no-reuse-gateways"
}

# log function with message argument
Expand Down
2 changes: 1 addition & 1 deletion scripts/experiments/num_gateways/benchmark_num_gateways.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function benchmark_config {
NUM_GATEWAYS=$2
N_CHUNKS=$((N_CHUNKS_PER_CONNECTION * NUM_CONNECTIONS * NUM_GATEWAYS))
set -x
skylark replicate-random $SRC_REGION $DST_REGION $INTER_REGION --chunk-size-mb $CHUNK_SIZE_MB --n-chunks $N_CHUNKS --num-gateways $NUM_GATEWAYS --num-outgoing-connections $NUM_CONNECTIONS --no-serve-web-dashboard --aws-instance-class m5.4xlarge
skylark replicate-random $SRC_REGION $DST_REGION $INTER_REGION --chunk-size-mb $CHUNK_SIZE_MB --n-chunks $N_CHUNKS --num-gateways $NUM_GATEWAYS --num-outgoing-connections $NUM_CONNECTIONS --aws-instance-class m5.4xlarge
set +x
}

Expand Down
2 changes: 1 addition & 1 deletion skylark/benchmark/replicate/benchmark_triangles.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def bench_triangle(
total_bytes = n_chunks * chunk_size_mb * MB
crs = rc.run_replication_plan(job)
logger.info(f"{total_bytes / GB:.2f}GByte replication job launched")
stats = rc.monitor_transfer(crs, serve_web_dashboard=False, show_pbar=False, time_limit_seconds=600)
stats = rc.monitor_transfer(crs, show_pbar=False, time_limit_seconds=600)
stats["success"] = True
stats["log"] = rc.get_chunk_status_log_df()
rc.deprovision_gateways()
Expand Down
2 changes: 0 additions & 2 deletions skylark/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ def replicate_random(
key_prefix: str = "/test/replicate_random",
time_limit_seconds: Optional[int] = None,
log_interval_s: float = 1.0,
serve_web_dashboard: bool = False,
):
"""Replicate objects from remote object store to another remote object store."""
print_header()
Expand Down Expand Up @@ -166,7 +165,6 @@ def replicate_random(
crs,
show_pbar=True,
log_interval_s=log_interval_s,
serve_web_dashboard=serve_web_dashboard,
time_limit_seconds=time_limit_seconds,
)
stats["success"] = stats["monitor_status"] == "completed"
Expand Down
14 changes: 0 additions & 14 deletions skylark/replicate/replicator_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from skylark.compute.server import Server, ServerState
from skylark.chunk import Chunk, ChunkRequest, ChunkRequestHop, ChunkState
from skylark.replicate.replication_plan import ReplicationJob, ReplicationTopology
from skylark.replicate.replicator_client_dashboard import ReplicatorClientDashboard
from skylark.utils.utils import PathLike, Timer, do_parallel


Expand Down Expand Up @@ -347,18 +346,10 @@ def monitor_transfer(
completed_state=ChunkState.upload_complete,
show_pbar=False,
log_interval_s: Optional[float] = None,
serve_web_dashboard=False,
dash_host="0.0.0.0",
dash_port="8080",
time_limit_seconds: Optional[float] = None,
cancel_pending: bool = True,
) -> Dict:
total_bytes = sum([cr.chunk.chunk_length_bytes for cr in crs])
if serve_web_dashboard:
dash = ReplicatorClientDashboard(dash_host, dash_port)
dash.start()
atexit.register(dash.shutdown)
logger.info(f"Web dashboard running at {dash.dashboard_url}")
last_log = None

# register atexit handler to cancel pending chunk requests (force shutdown gateways)
Expand All @@ -383,9 +374,6 @@ def fn(s: Server):
) as pbar:
while True:
log_df = self.get_chunk_status_log_df()
if serve_web_dashboard:
dash.update_status_df(log_df)

# count completed bytes
last_log_df = (
log_df.groupby(["chunk_id"])
Expand All @@ -405,8 +393,6 @@ def fn(s: Server):
pbar.set_description(f"Replication: average {throughput_gbits:.2f}Gbit/s")

if len(completed_chunk_ids) == len(crs) or time_limit_seconds is not None and t.elapsed > time_limit_seconds:
if serve_web_dashboard:
dash.shutdown()
if cancel_pending:
atexit.unregister(shutdown_handler)
return dict(
Expand Down
62 changes: 0 additions & 62 deletions skylark/replicate/replicator_client_dashboard.py

This file was deleted.

124 changes: 0 additions & 124 deletions static/index.html

This file was deleted.

0 comments on commit 73536c7

Please sign in to comment.