glimpse-redis 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +7 -0
- data/glimpse-redis.gemspec +1 -0
- data/lib/glimpse/views/redis.rb +8 -3
- data/lib/glimpse-redis/version.rb +1 -1
- metadata +19 -2
data/CHANGELOG.md
ADDED
data/glimpse-redis.gemspec
CHANGED
data/lib/glimpse/views/redis.rb
CHANGED
@@ -8,9 +8,9 @@ class Redis::Client
|
|
8
8
|
self.query_count = 0
|
9
9
|
self.query_time = 0
|
10
10
|
|
11
|
-
def call_with_timing(*args)
|
11
|
+
def call_with_timing(*args, &block)
|
12
12
|
start = Time.now
|
13
|
-
call_without_timing(*args)
|
13
|
+
call_without_timing(*args, &block)
|
14
14
|
ensure
|
15
15
|
Redis::Client.query_time += (Time.now - start)
|
16
16
|
Redis::Client.query_count += 1
|
@@ -26,7 +26,12 @@ module Glimpse
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def formatted_duration
|
29
|
-
|
29
|
+
ms = duration * 1000
|
30
|
+
if ms >= 1000
|
31
|
+
"%.2fms" % ms
|
32
|
+
else
|
33
|
+
"%.0fms" % ms
|
34
|
+
end
|
30
35
|
end
|
31
36
|
|
32
37
|
def calls
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimpse-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: glimpse
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
- !ruby/object:Gem::Dependency
|
15
31
|
name: redis
|
16
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -35,6 +51,7 @@ extensions: []
|
|
35
51
|
extra_rdoc_files: []
|
36
52
|
files:
|
37
53
|
- .gitignore
|
54
|
+
- CHANGELOG.md
|
38
55
|
- Gemfile
|
39
56
|
- LICENSE.txt
|
40
57
|
- README.md
|