mirror of
https://github.com/status-im/nimbus-benchmarking.git
synced 2025-02-05 15:43:26 +00:00
state_sim support
This commit is contained in:
parent
7aefef979a
commit
e74d4a09f8
@ -47,6 +47,43 @@ if ($bench_type eq 'block_sim') {
|
||||
$start_processing = 1 if /^Done!$/;
|
||||
next if not $start_processing;
|
||||
|
||||
if (/^Validators: (\d+), epoch length: (\d+)$/) {
|
||||
($validators, $epoch_length) = ($1, $2);
|
||||
} elsif (/^(\d+\.\d+),\s+(\d+\.\d+),\s+(\d+\.\d+),\s+(\d+\.\d+),\s+(\d+), (.+)$/) {
|
||||
my ($average, $stddev, $min, $max, $samples, $test_name) = ($1, $2, $3, $4, $5, $6);
|
||||
my %test = (
|
||||
name => $test_name,
|
||||
);
|
||||
@{$test{'parameters'}} = (
|
||||
{
|
||||
name => 'validators',
|
||||
value => $validators * 1,
|
||||
},
|
||||
{
|
||||
name => 'epoch length',
|
||||
value => $epoch_length * 1,
|
||||
},
|
||||
);
|
||||
@{$test{'results'}} = (
|
||||
{
|
||||
name => 'average',
|
||||
value => $average * 1,
|
||||
},
|
||||
);
|
||||
push(@{$group{'tests'}}, \%test);
|
||||
}
|
||||
}
|
||||
} elsif ($bench_type eq 'state_sim') {
|
||||
my $start_processing = 0;
|
||||
my $validators = 0;
|
||||
my $epoch_length = 0;
|
||||
while (<$input_handle>) {
|
||||
# strip both ends
|
||||
s/^\s+|\s+$//;
|
||||
|
||||
$start_processing = 1 if /^:Done!$/;
|
||||
next if not $start_processing;
|
||||
|
||||
if (/^Validators: (\d+), epoch length: (\d+)$/) {
|
||||
($validators, $epoch_length) = ($1, $2);
|
||||
} elsif (/^(\d+\.\d+),\s+(\d+\.\d+),\s+(\d+\.\d+),\s+(\d+\.\d+),\s+(\d+), (.+)$/) {
|
||||
|
@ -17,6 +17,9 @@ BENCHMARKS=()
|
||||
if [[ -f "research/block_sim.nim" ]]; then
|
||||
BENCHMARKS+=( block_sim )
|
||||
fi
|
||||
if [[ -f "research/state_sim.nim" ]]; then
|
||||
BENCHMARKS+=( state_sim )
|
||||
fi
|
||||
|
||||
make -j${NPROC} ${BENCHMARKS[*]}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user