| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package OpenTracing::Implementation::DataDog::Utils; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
OpenTracing::Implementation::DataDog::Utils - DataDog Utilities |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 'v0.40.0.7-TRIAL'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
; |
|
12
|
|
|
|
|
|
|
|
|
13
|
13
|
|
|
13
|
|
103
|
use Exporter qw/import/; |
|
|
13
|
|
|
|
|
37
|
|
|
|
13
|
|
|
|
|
1510
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our @EXPORT_OK = qw/random_64bit_int nano_seconds/; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 EXPORTS OK |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
The following subroutines can be imported into your namespance: |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 random_64bit_int |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Generates a 64bit integers (or actually a 63bit, or signed 64bit) |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
|
30
|
|
|
|
|
|
|
|
|
31
|
22
|
|
|
22
|
1
|
612
|
sub random_64bit_int { int(rand( 2**63 )) } |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 nano_seconds |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
To turn floatingpoint times into number of nano seconds |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
|
40
|
|
|
|
|
|
|
|
|
41
|
2
|
|
|
2
|
1
|
68
|
sub nano_seconds { int( $_[0] * 1_000_000_000 ) } |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=over |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item L<OpenTracing::Implementation::DataDog> |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Sending traces to DataDog using Agent. |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=back |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Theo van Hoesel <tvanhoesel@perceptyx.com> |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
'OpenTracing::Implementation::DataDog' |
|
66
|
|
|
|
|
|
|
is Copyright (C) 2019 .. 2020, Perceptyx Inc |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it under |
|
69
|
|
|
|
|
|
|
the terms of the Artistic License 2.0. |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This package is distributed in the hope that it will be useful, but it is |
|
72
|
|
|
|
|
|
|
provided "as is" and without any express or implied warranties. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
For details, see the full text of the license in the file LICENSE. |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |