peek-dalli 1.1.3 → 1.2.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: aaeba1370324052423136eaedd78635379fb835b
4
- data.tar.gz: d0478471396f1da47df5fd200892a65688bb6432
3
+ metadata.gz: 7c0ccd938651daf8a558ef56cddd739189d483c2
4
+ data.tar.gz: af5c6ae0cc6af8795eb80361fe0154cf90a941ca
5
5
  SHA512:
6
- metadata.gz: e834dd7eb7924284e5bfe2a91d685770f23c982dc7c5be3374c747c7700e6b83df1e79599f1bf6df84799a41861b9b4500a880608c0e17eec14c494fed5a1441
7
- data.tar.gz: c5a5e6ce365e892ffaa8c0de78e32799bb7a7039ebffe48f555ac4beb7e3bd1bb3e1026459ca471fbcc8900345cb29bf829eae235ddf4c30362f07359c7b0554
6
+ metadata.gz: 6b588e844b4fa525af70617d54360d36371d4ec4bab01358f7440108383b5d1b649ca9d981efd5196d86cdd714f1184d060ddf73f59c4afeb51cf55172f29abc
7
+ data.tar.gz: a1d513352c578783b2558071856708c65ff2884939ee73b8a9f542db18dca94e78ea1a7f7730b015ef095de4b4f99edf305ff61f4eccb493fa6316dfd0cda093
@@ -19,3 +19,7 @@
19
19
  - Rename label from dalli to memcache - #6 @twe4ked
20
20
  - Capture "other" cache related notifications - #5 @twe4ked
21
21
  - Display durations more than 1000ms in seconds - #3 @jonah-williams
22
+
23
+ # 1.2.0
24
+
25
+ - Remove CoffeeScript dependency - #10 @gfx
@@ -0,0 +1,14 @@
1
+ $(document).on('peek:render', function(event, requestId, data) {
2
+ let title = [];
3
+ title.push(`Reads: ${data.context.dalli.reads}`);
4
+ title.push(`Misses: ${data.context.dalli.misses}`);
5
+ title.push(`Writes: ${data.context.dalli.writes}`);
6
+ title.push(`Other: ${data.context.dalli.others}`);
7
+
8
+ return $('#peek-dalli-tooltip')
9
+ .attr('title', title.join('<br>'))
10
+ .tipsy({
11
+ html: true,
12
+ gravity: $.fn.tipsy.autoNS
13
+ });
14
+ });
@@ -1,5 +1,5 @@
1
1
  module Peek
2
2
  module Dalli
3
- VERSION = '1.1.3'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -1,16 +1,16 @@
1
- require 'atomic'
1
+ require 'concurrent/atomics'
2
2
 
3
3
  module Peek
4
4
  module Views
5
5
  class Dalli < View
6
6
  def initialize(options = {})
7
- @duration = Atomic.new(0)
8
- @calls = Atomic.new(0)
7
+ @duration = Concurrent::AtomicReference.new(0)
8
+ @calls = Concurrent::AtomicReference.new(0)
9
9
 
10
- @reads = Atomic.new(0)
11
- @misses = Atomic.new(0)
12
- @writes = Atomic.new(0)
13
- @others = Atomic.new(0)
10
+ @reads = Concurrent::AtomicReference.new(0)
11
+ @misses = Concurrent::AtomicReference.new(0)
12
+ @writes = Concurrent::AtomicReference.new(0)
13
+ @others = Concurrent::AtomicReference.new(0)
14
14
 
15
15
  setup_subscribers
16
16
  end
@@ -26,7 +26,7 @@ module Peek
26
26
 
27
27
  def context
28
28
  {
29
- :reads => @reads.value,
29
+ :reads => @reads.value,
30
30
  :misses => @misses.value,
31
31
  :writes => @writes.value,
32
32
  :others => @others.value,
@@ -36,7 +36,7 @@ module Peek
36
36
  def results
37
37
  {
38
38
  :duration => formatted_duration,
39
- :calls => @calls.value,
39
+ :calls => @calls.value,
40
40
  }
41
41
  end
42
42
 
@@ -46,9 +46,9 @@ module Peek
46
46
  # Reset each counter when a new request starts
47
47
  before_request do
48
48
  @duration.value = 0
49
- @calls.value = 0
49
+ @calls.value = 0
50
50
 
51
- @reads.value = 0
51
+ @reads.value = 0
52
52
  @misses.value = 0
53
53
  @writes.value = 0
54
54
  @others.value = 0
@@ -19,5 +19,6 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_dependency 'peek'
21
21
  gem.add_dependency 'dalli'
22
- gem.add_dependency 'atomic', '>= 1.0.0'
22
+ gem.add_dependency 'concurrent-ruby'
23
+ gem.add_dependency 'concurrent-ruby-ext'
23
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peek-dalli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garrett Bjerkhoel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2017-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: peek
@@ -39,19 +39,33 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: atomic
42
+ name: concurrent-ruby
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.0
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.0
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: concurrent-ruby-ext
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: Take a peek into the Memcache commands made through Dalli during your
56
70
  application's requests.
57
71
  email:
@@ -66,7 +80,7 @@ files:
66
80
  - LICENSE.txt
67
81
  - README.md
68
82
  - Rakefile
69
- - app/assets/javascripts/peek/views/dalli.coffee
83
+ - app/assets/javascripts/peek/views/dalli.js
70
84
  - app/views/peek/views/_dalli.html.erb
71
85
  - lib/peek-dalli.rb
72
86
  - lib/peek-dalli/railtie.rb
@@ -92,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
106
  version: '0'
93
107
  requirements: []
94
108
  rubyforge_project:
95
- rubygems_version: 2.2.3
109
+ rubygems_version: 2.6.11
96
110
  signing_key:
97
111
  specification_version: 4
98
112
  summary: Take a peek into the Memcache commands made through Dalli during your application's
@@ -1,12 +0,0 @@
1
- $(document).on 'peek:render', (event, requestId, data) ->
2
- title = []
3
- title.push("Reads: #{data.context.dalli.reads}")
4
- title.push("Misses: #{data.context.dalli.misses}")
5
- title.push("Writes: #{data.context.dalli.writes}")
6
- title.push("Other: #{data.context.dalli.others}")
7
-
8
- $('#peek-dalli-tooltip')
9
- .attr('title', title.join('<br>'))
10
- .tipsy
11
- html: true
12
- gravity: $.fn.tipsy.autoNS