line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package NewFangle::Segment 0.07 { |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
49
|
use strict; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
207
|
|
4
|
7
|
|
|
7
|
|
47
|
use warnings; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
185
|
|
5
|
7
|
|
|
7
|
|
106
|
use 5.014; |
|
7
|
|
|
|
|
24
|
|
6
|
7
|
|
|
7
|
|
49
|
use NewFangle::FFI; |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
572
|
|
7
|
7
|
|
|
7
|
|
54
|
use Carp (); |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
1824
|
|
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__ |