-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpgautobench.pl
More file actions
executable file
·76 lines (55 loc) · 1.38 KB
/
pgautobench.pl
File metadata and controls
executable file
·76 lines (55 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use Data::Dumper;
use PGBench::Types;
use PGBench::JobList;
use PGBench::BenchDirector;
use PGBench::Config;
use vars qw( $Config );
my %opt;
GetOptions(\%opt,
'release=s',
'configure-opts=s',
'bench-root-dir=s',
) or pod2usage( -verbose => 0 );
my ( $mode ) = @ARGV;
if ( $mode eq 'job' ) {
my $joblist = JobList->new();
if (1) {
$joblist->add_job(
db_branch => $opt{'release'},
db_compile_config => $opt{'configure-opts'},
db_run_config => {
log_min_duration_statement => 42,
},
benchmark => 'SysbenchCPU',
benchmark_opts => {
threads => 10,
max_requests => 2000,
max_prime => 11000,
},
);
$joblist->add_job(
benchmark => 'SysbenchMemory',
benchmark_opts => {
max_time => 5,
},
);
}
$joblist->add_job(
benchmark => 'SysbenchFileIO',
benchmark_opts => {
threads => 10,
test_mode => 'rndrd',
},
);
my $director = BenchDirector->new(
benchJobs => $joblist,
);
$director->start_run();
}
sub pod2usage {
print "You failed!\n";
}