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 +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/javascripts/peek/views/dalli.js +14 -0
- data/lib/peek-dalli/version.rb +1 -1
- data/lib/peek/views/dalli.rb +11 -11
- data/peek-dalli.gemspec +2 -1
- metadata +21 -7
- data/app/assets/javascripts/peek/views/dalli.coffee +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c0ccd938651daf8a558ef56cddd739189d483c2
|
4
|
+
data.tar.gz: af5c6ae0cc6af8795eb80361fe0154cf90a941ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b588e844b4fa525af70617d54360d36371d4ec4bab01358f7440108383b5d1b649ca9d981efd5196d86cdd714f1184d060ddf73f59c4afeb51cf55172f29abc
|
7
|
+
data.tar.gz: a1d513352c578783b2558071856708c65ff2884939ee73b8a9f542db18dca94e78ea1a7f7730b015ef095de4b4f99edf305ff61f4eccb493fa6316dfd0cda093
|
data/CHANGELOG.md
CHANGED
@@ -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
|
+
});
|
data/lib/peek-dalli/version.rb
CHANGED
data/lib/peek/views/dalli.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
require '
|
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 =
|
8
|
-
@calls
|
7
|
+
@duration = Concurrent::AtomicReference.new(0)
|
8
|
+
@calls = Concurrent::AtomicReference.new(0)
|
9
9
|
|
10
|
-
@reads
|
11
|
-
@misses =
|
12
|
-
@writes =
|
13
|
-
@others =
|
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
|
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
|
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
|
49
|
+
@calls.value = 0
|
50
50
|
|
51
|
-
@reads.value
|
51
|
+
@reads.value = 0
|
52
52
|
@misses.value = 0
|
53
53
|
@writes.value = 0
|
54
54
|
@others.value = 0
|
data/peek-dalli.gemspec
CHANGED
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.
|
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:
|
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:
|
42
|
+
name: concurrent-ruby
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
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:
|
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.
|
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.
|
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
|