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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5c8b8ccdd8f38bcdf53566ff6454222ed871120
4
- data.tar.gz: 0dee01aef853a6a2ede9c071e0fabaec060153ed
3
+ metadata.gz: 87e12e1edef95519e9bfbc64e02cf6c1b1d70a1b
4
+ data.tar.gz: 4264ab5b8b1e5aaa1b05ca778fa1f0de60dcad89
5
5
  SHA512:
6
- metadata.gz: 336cefc33521593becdb4561512ef164923f377b7e880925acf3d538cde73f82512adbbf19eb2157115fac1d444c6c65961b82794600593fc0d0e5f049c6e399
7
- data.tar.gz: bbd62aef0cefca7997114b78fa8640d132e67d995013acd43a591c3dde45ddf994d4b42ebeb38b672a8087f3fe26d08b33303b95397ac44efcbcbf28ca4f54f5
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
@@ -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 = pack_uint64_big_endian(zclock_time)
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
- zclock = unpack_uint64_big_endian(info[0..7])
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[8..15])
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
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.11.3"
2
+ VERSION = "0.12.0"
3
3
  end
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.11.3
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-10-07 00:00:00.000000000 Z
11
+ date: 2014-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake