Skip to content

Commit

Permalink
fix narwhal benchmarks (MystenLabs#5133)
Browse files Browse the repository at this point in the history
Fix various issues that prevent currently benchmarks to properly run.
  • Loading branch information
akichidis authored Oct 12, 2022
1 parent 8f57610 commit 20adb89
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
10 changes: 5 additions & 5 deletions narwhal/benchmark/benchmark/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ def compile(mem_profiling):
@staticmethod
def generate_key(filename):
assert isinstance(filename, str)
return f'./node generate_keys --filename {filename}'
return f'./narwhal-node generate_keys --filename {filename}'

@staticmethod
def generate_network_key(filename):
assert isinstance(filename, str)
return f'./node generate_network_keys --filename {filename}'
return f'./narwhal-node generate_network_keys --filename {filename}'

@staticmethod
def run_primary(primary_keys, primary_network_keys, worker_keys, committee, workers, store, parameters, debug=False):
Expand All @@ -45,7 +45,7 @@ def run_primary(primary_keys, primary_network_keys, worker_keys, committee, work
assert isinstance(parameters, str)
assert isinstance(debug, bool)
v = '-vvv' if debug else '-vv'
return (f'./node {v} run --primary-keys {primary_keys} --primary-network-keys {primary_network_keys} '
return (f'./narwhal-node {v} run --primary-keys {primary_keys} --primary-network-keys {primary_network_keys} '
f'--worker-keys {worker_keys} --committee {committee} --workers {workers} --store {store} '
f'--parameters {parameters} primary')

Expand All @@ -68,7 +68,7 @@ def run_no_consensus_primary(
assert isinstance(parameters, str)
assert isinstance(debug, bool)
v = '-vvv' if debug else '-vv'
return (f'./node {v} run --primary-keys {primary_keys} --primary-network-keys {primary_network_keys} '
return (f'./narwhal-node {v} run --primary-keys {primary_keys} --primary-network-keys {primary_network_keys} '
f'--worker-keys {worker_keys} --committee {committee} --workers {workers} --store {store} '
f'--parameters {parameters} primary --consensus-disabled')

Expand All @@ -82,7 +82,7 @@ def run_worker(primary_keys, primary_network_keys, worker_keys, committee, worke
assert isinstance(parameters, str)
assert isinstance(debug, bool)
v = '-vvv' if debug else '-vv'
return (f'./node {v} run --primary-keys {primary_keys} --primary-network-keys {primary_network_keys} '
return (f'./narwhal-node {v} run --primary-keys {primary_keys} --primary-network-keys {primary_network_keys} '
f'--worker-keys {worker_keys} --committee {committee} --workers {workers} --store {store} '
f'--parameters {parameters} worker --id {id}')

Expand Down
4 changes: 2 additions & 2 deletions narwhal/benchmark/benchmark/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _parse_clients(self, log):
return size, rate, start, misses, samples

def _parse_primaries(self, log):
if search(r'(?:panicked|ERROR)', log) is not None:
if search(r'(?:panicked)', log) is not None:
raise ParseError('Primary(s) panicked')

tmp = findall(r'(.*?) .* Created B\d+\([^ ]+\) -> ([^ ]+=)', log)
Expand Down Expand Up @@ -144,7 +144,7 @@ def _parse_primaries(self, log):
return proposals, commits, configs, ip

def _parse_workers(self, log):
if search(r'(?:panic|ERROR)', log) is not None:
if search(r'(?:panicked)', log) is not None:
raise ParseError('Worker(s) panicked')

tmp = findall(r'Batch ([^ ]+) contains (\d+) B', log)
Expand Down
10 changes: 6 additions & 4 deletions narwhal/benchmark/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def local(ctx, debug=True):
"socket_addr": "/ip4/127.0.0.1/tcp/0/http"
},
"network_admin_server": {
"primary_network_admin_server_port": 6564,
"worker_network_admin_server_base_port": 6565
# Use a random available local port.
"primary_network_admin_server_port": 0,
"worker_network_admin_server_base_port": 0
},
}
try:
Expand Down Expand Up @@ -216,8 +217,9 @@ def remote(ctx, debug=False):
"socket_addr": "/ip4/0.0.0.0/tcp/0/http"
},
"network_admin_server": {
"primary_network_admin_server_port": 6564,
"worker_network_admin_server_base_port": 6565
# Use a random available local port.
"primary_network_admin_server_port": 0,
"worker_network_admin_server_base_port": 0
},
}
try:
Expand Down
2 changes: 1 addition & 1 deletion narwhal/node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ fn setup_benchmark_telemetry(
tracing_level: &str,
network_tracing_level: &str,
) -> Result<(), eyre::Report> {
let custom_directive = "executor::core=info";
let custom_directive = "narwhal_executor=info";
let filter = EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.parse(format!(
Expand Down

0 comments on commit 20adb89

Please sign in to comment.