logjam_agent 0.11.3 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/logjam_agent/util.rb +10 -4
- data/lib/logjam_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87e12e1edef95519e9bfbc64e02cf6c1b1d70a1b
|
4
|
+
data.tar.gz: 4264ab5b8b1e5aaa1b05ca778fa1f0de60dcad89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30f788ae0712b6676d8da1eca5c94248201bd75840ab6d92bd80589502b320760eca4ae477a6627c5fa5849b649cb8b551d800b8501a639ce97b99b5bb4aba42
|
7
|
+
data.tar.gz: 9543a11f742ee5787ed95c2951a3798c08d468bf6eeca7f3ed245fdd5fb3c277765027be1bd0e2db3c69aa5116644e2c9bd9e9fe0344b6573f9d7865a2a65a78
|
data/README.md
CHANGED
@@ -94,7 +94,7 @@ LogjamAgent.error_handler = lambda {|exception| ... }
|
|
94
94
|
|
95
95
|
The MIT License
|
96
96
|
|
97
|
-
Copyright (c) 2013 Stefan Kaes
|
97
|
+
Copyright (c) 2013, 2014 Stefan Kaes
|
98
98
|
|
99
99
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
100
100
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/logjam_agent/util.rb
CHANGED
@@ -5,6 +5,10 @@ module LogjamAgent
|
|
5
5
|
|
6
6
|
UINT64 = "Q"
|
7
7
|
|
8
|
+
META_INFO_VERSION = 1
|
9
|
+
META_INFO_TAG = 0xcabd
|
10
|
+
META_INFO_DEVICE_NUMBER = 0
|
11
|
+
|
8
12
|
# we assume we're running on MRI ruby
|
9
13
|
FIXNUM_MAX = 2 ** (1.size * 8 - 2) - 1
|
10
14
|
|
@@ -39,17 +43,19 @@ module LogjamAgent
|
|
39
43
|
end
|
40
44
|
|
41
45
|
def pack_info(n)
|
42
|
-
info =
|
46
|
+
info = [META_INFO_TAG, META_INFO_VERSION, META_INFO_DEVICE_NUMBER].pack("nnN")
|
47
|
+
info << pack_uint64_big_endian(zclock_time)
|
43
48
|
info << pack_uint64_big_endian(n)
|
44
49
|
end
|
45
50
|
|
46
51
|
def unpack_info(info)
|
47
|
-
|
52
|
+
tag, version, device = info[0..7].unpack("nnN")
|
53
|
+
zclock = unpack_uint64_big_endian(info[8..15])
|
48
54
|
secs = zclock / 1000
|
49
55
|
msecs = zclock % 1000
|
50
56
|
sent = Time.at(secs) + 1000.0/msecs
|
51
|
-
sequence = unpack_uint64_big_endian(info[
|
52
|
-
[sent, sequence]
|
57
|
+
sequence = unpack_uint64_big_endian(info[16..23])
|
58
|
+
[tag, version, device, sent, sequence]
|
53
59
|
end
|
54
60
|
end
|
55
61
|
end
|
data/lib/logjam_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|