line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package NewFangle::FFI 0.0901 { |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
183662
|
use strict; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
194
|
|
4
|
8
|
|
|
8
|
|
32
|
use warnings; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
145
|
|
5
|
8
|
|
|
8
|
|
137
|
use 5.014; |
|
8
|
|
|
|
|
23
|
|
6
|
8
|
|
|
8
|
|
2300
|
use NewFangle::Lib; |
|
8
|
|
|
|
|
19
|
|
|
8
|
|
|
|
|
244
|
|
7
|
8
|
|
|
8
|
|
4043
|
use FFI::Platypus 1.26; |
|
8
|
|
|
|
|
45829
|
|
|
8
|
|
|
|
|
275
|
|
8
|
8
|
|
|
8
|
|
2857
|
use FFI::C 0.08; |
|
8
|
|
|
|
|
19543
|
|
|
8
|
|
|
|
|
551
|
|
9
|
8
|
|
|
8
|
|
56
|
use base qw( Exporter ); |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
3707
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT = qw( $ffi ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ABSTRACT: Private class for NewFangle.pm |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $ffi = FFI::Platypus->new( |
17
|
|
|
|
|
|
|
api => 1, |
18
|
|
|
|
|
|
|
lib => [NewFangle::Lib->lib], |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
$ffi->mangler(sub { "newrelic_$_[0]" }); |
21
|
|
|
|
|
|
|
$ffi->load_custom_type('::PtrObject', 'newrelic_segment_t', 'NewFangle::Segment', |
22
|
|
|
|
|
|
|
sub { bless { ptr => $_[0] }, 'NewFangle::Segment' }); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$ffi->type('uint64' => 'newrelic_time_us_t'); |
25
|
|
|
|
|
|
|
$ffi->type('object(NewFangle::App)' => 'newrelic_app_t'); |
26
|
|
|
|
|
|
|
$ffi->type('object(NewFangle::Transaction)' => 'newrelic_txn_t',); |
27
|
|
|
|
|
|
|
$ffi->type('object(NewFangle::CustomEvent)' => 'newrelic_custom_event_t'); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
FFI::C->ffi($ffi); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
package NewFangle::NewrelicLoglevel 0.0901 { |
32
|
|
|
|
|
|
|
FFI::C->enum([ |
33
|
|
|
|
|
|
|
'error', |
34
|
|
|
|
|
|
|
'warning', |
35
|
|
|
|
|
|
|
'info', |
36
|
|
|
|
|
|
|
'debug', |
37
|
|
|
|
|
|
|
], { prefix => 'NEWRELIC_LOG_' }); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
package NewFangle::NewrelicTransactionTracerThreshold 0.0901 { |
41
|
|
|
|
|
|
|
FFI::C->enum([ |
42
|
|
|
|
|
|
|
'is_apdex_failing', |
43
|
|
|
|
|
|
|
'is_over_duration', |
44
|
|
|
|
|
|
|
], { prefix => 'NEWRELIC_THRESHOLD_' }); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
package NewFangle::NewrelicTtRecordsql 0.0901 { |
48
|
|
|
|
|
|
|
FFI::C->enum([ |
49
|
|
|
|
|
|
|
'off', |
50
|
|
|
|
|
|
|
'raw', |
51
|
|
|
|
|
|
|
'obfuscated', |
52
|
|
|
|
|
|
|
], { prefix => 'NEWRELIC_SQL_' }); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
package NewFangle::DatastoreReporting 0.0901 { |
56
|
|
|
|
|
|
|
FFI::C->struct([ |
57
|
|
|
|
|
|
|
enabled => 'bool', |
58
|
|
|
|
|
|
|
record_sql => 'newrelic_tt_recordsql_t', |
59
|
|
|
|
|
|
|
threshold_us => 'newrelic_time_us_t', |
60
|
|
|
|
|
|
|
]); |
61
|
|
|
|
|
|
|
}; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
package NewFangle::NewrelicTransactionTracerConfig 0.0901 { |
64
|
|
|
|
|
|
|
FFI::C->struct([ |
65
|
|
|
|
|
|
|
enabled => 'bool', |
66
|
|
|
|
|
|
|
threshold => 'newrelic_transaction_tracer_threshold_t', |
67
|
|
|
|
|
|
|
duration_us => 'newrelic_time_us_t', |
68
|
|
|
|
|
|
|
stack_trace_threshold_us => 'newrelic_time_us_t', |
69
|
|
|
|
|
|
|
datastore_reporting => 'datastore_reporting_t', |
70
|
|
|
|
|
|
|
]); |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
package NewFangle::NewrelicDatastoreSegmentConfig 0.0901 { |
74
|
|
|
|
|
|
|
FFI::C->struct([ |
75
|
|
|
|
|
|
|
instance_reporting => 'bool', |
76
|
|
|
|
|
|
|
database_name_reporting => 'bool', |
77
|
|
|
|
|
|
|
]); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
package NewFangle::NewrelicDistributedTracingConfig 0.0901 { |
81
|
|
|
|
|
|
|
FFI::C->struct([ |
82
|
|
|
|
|
|
|
enabled => 'bool', |
83
|
|
|
|
|
|
|
]); |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
package NewFangle::NewrelicSpanEventConfig 0.0901 { |
87
|
|
|
|
|
|
|
FFI::C->struct([ |
88
|
|
|
|
|
|
|
enabled => 'bool', |
89
|
|
|
|
|
|
|
]); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
package NewFangle::NewrelicAppConfig 0.0901 { |
93
|
|
|
|
|
|
|
FFI::C->struct([ |
94
|
|
|
|
|
|
|
app_name => 'string(255)', |
95
|
|
|
|
|
|
|
license_key => 'string(255)', |
96
|
|
|
|
|
|
|
redirect_collector => 'string(100)', |
97
|
|
|
|
|
|
|
log_filename => 'string(512)', |
98
|
|
|
|
|
|
|
log_level => 'newrelic_loglevel_t', |
99
|
|
|
|
|
|
|
transaction_tracer => 'newrelic_transaction_tracer_config_t', |
100
|
|
|
|
|
|
|
datastore_tracer => 'newrelic_datastore_segment_config_t', |
101
|
|
|
|
|
|
|
distributed_tracing => 'newrelic_distributed_tracing_config_t', |
102
|
|
|
|
|
|
|
span_events => 'newrelic_span_event_config_t', |
103
|
|
|
|
|
|
|
], { trim_string => 1 }); |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
}; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
1; |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
__END__ |