line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IBM::SONAS; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
21894
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
27
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1079
|
use IBM::StorageSystem; |
|
1
|
|
|
|
|
105170
|
|
|
1
|
|
|
|
|
53
|
|
7
|
1
|
|
|
1
|
|
12
|
use Carp qw(croak); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
113
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.20'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @METHODS = qw(health disk export filesystem interface mount node quota |
12
|
|
|
|
|
|
|
replication service snapshot task); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our @ATTRS = qw(cluster_throughput cluster_client_throughput |
15
|
|
|
|
|
|
|
cluster_create_delete_latency cluster_create_delete_operations |
16
|
|
|
|
|
|
|
cluster_open_close_latency cluster_open_close_operations |
17
|
|
|
|
|
|
|
cluster_read_write_operations cluster_read_write_latency); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
foreach my $method ( @METHODS ) { |
20
|
|
|
|
|
|
|
{ |
21
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
228
|
|
22
|
|
|
|
|
|
|
my $get_method = "get_$method"; |
23
|
|
|
|
|
|
|
my $get_methods = "get_${method}s"; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
*{ __PACKAGE__ ."::$method" } = sub { |
26
|
0
|
|
|
0
|
|
|
my $self = shift; |
27
|
0
|
|
|
|
|
|
$self->{ss}->$method(@_) |
28
|
|
|
|
|
|
|
}; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
*{ __PACKAGE__ ."::$get_method" } = sub { |
31
|
0
|
|
|
0
|
|
|
my $self = shift; |
32
|
0
|
|
|
|
|
|
$self->{ss}->$get_method(@_) |
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
*{ __PACKAGE__ ."::$get_methods" } = sub { |
36
|
0
|
|
|
0
|
|
|
my $self = shift; |
37
|
0
|
|
|
|
|
|
$self->{ss}->$get_methods(@_) |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
foreach my $attr ( @ATTRS ) { |
43
|
|
|
|
|
|
|
{ |
44
|
1
|
|
|
1
|
|
5
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
162
|
|
45
|
|
|
|
|
|
|
*{ __PACKAGE__ ."::$attr" } = sub { |
46
|
0
|
|
|
0
|
|
|
my $self = shift; |
47
|
0
|
|
|
|
|
|
$self->{ss}->$attr(@_) |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub new { |
53
|
0
|
|
|
0
|
1
|
|
my ( $class, %args ) = @_; |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my $self = bless {} , $class; |
56
|
0
|
|
|
|
|
|
$self->{ss} = IBM::StorageSystem->new( %args, no_stats => 1 ); |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
return $self |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |