line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package NewFangle::Segment 0.08 { |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
35
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
202
|
|
4
|
6
|
|
|
6
|
|
27
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
116
|
|
5
|
6
|
|
|
6
|
|
69
|
use 5.014; |
|
6
|
|
|
|
|
18
|
|
6
|
6
|
|
|
6
|
|
27
|
use NewFangle::FFI; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
370
|
|
7
|
6
|
|
|
6
|
|
33
|
use Carp (); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
1207
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: NewRelic segment class |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
0
|
1
|
|
sub transaction { shift->{txn} } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$ffi->attach( [ end_segment => 'end' ] => ['newrelic_txn_t', 'opaque*'] => 'bool' => sub { |
16
|
|
|
|
|
|
|
my($xsub, $self) = @_; |
17
|
|
|
|
|
|
|
my $txn = $self->{txn}; |
18
|
|
|
|
|
|
|
$xsub->($self->{txn}, \$self->{ptr}); |
19
|
|
|
|
|
|
|
}); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
$ffi->attach( [ set_segment_parent => 'set_parent' ] => [ 'newrelic_segment_t', 'newrelic_segment_t' ] => 'bool' ); |
23
|
|
|
|
|
|
|
$ffi->attach( [ set_segment_parent_root => 'set_parent_root' ] => [ 'newrelic_segment_t' ] => 'bool' ); |
24
|
|
|
|
|
|
|
$ffi->attach( [ set_segment_timing => 'set_timing' ] => [ 'newrelic_segment_t', 'newrelic_time_us_t', |
25
|
|
|
|
|
|
|
'newrelic_time_us_t' ] => 'bool' ); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub DESTROY |
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
0
|
|
|
my($self) = @_; |
30
|
0
|
0
|
|
|
|
|
$self->end if defined $self->{ptr}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |