rack-mini-profiler 0.10.6 → 0.10.7
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -5
- data/lib/mini_profiler/client_settings.rb +1 -1
- data/lib/mini_profiler/profiler.rb +3 -3
- data/lib/mini_profiler/profiling_methods.rb +4 -4
- data/lib/mini_profiler/storage/file_store.rb +2 -2
- data/lib/mini_profiler/storage/memcache_store.rb +2 -2
- data/lib/mini_profiler/storage/memory_store.rb +4 -4
- data/lib/mini_profiler/storage/redis_store.rb +3 -3
- data/lib/mini_profiler/timer_struct/custom.rb +1 -1
- data/lib/mini_profiler/timer_struct/page.rb +1 -1
- data/lib/mini_profiler/timer_struct/request.rb +3 -3
- data/lib/mini_profiler/timer_struct/sql.rb +1 -1
- data/lib/mini_profiler/version.rb +1 -1
- data/lib/patches/db/activerecord.rb +1 -1
- data/lib/patches/db/mysql2.rb +1 -1
- data/lib/patches/db/neo4j.rb +1 -1
- data/lib/patches/db/oracle_enhanced.rb +2 -2
- data/lib/patches/db/pg.rb +5 -5
- data/lib/patches/db/plucky.rb +1 -1
- data/lib/patches/db/riak.rb +2 -2
- data/lib/patches/db/rsolr.rb +1 -1
- data/lib/patches/sql_patches.rb +2 -2
- data/rack-mini-profiler.gemspec +6 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00a128037529807d7766b5879fbe52bb08e166b4
|
4
|
+
data.tar.gz: 0b50933b899ed619bea7c18e08f8448795d4634d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a18aa291f92f0ca6f33f56285eaca6dccfd07eb02b33470a6af05af23fb3f941c72588d0c35d4342fd2c34567c74e0f301de01d82be54b4c19d2433c7c2ccf7
|
7
|
+
data.tar.gz: d7c07474c0bdb2df7e76129d0cc604f2622974a1080e3a41bdcc70b6556408fcb16ae7f31ab0dd46c32354ffce52eb53c30947cb0cd9d29a88c88394dce907ea
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.10.7 2017-11-24
|
4
|
+
|
5
|
+
- [FEATURE] Replace Time.now with Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
6
|
+
- [FIX] Error with webrick and empty cache control
|
7
|
+
|
3
8
|
## 0.10.6 2017-10-30
|
4
9
|
|
5
10
|
- [FEATURE] Support for vertical positions (top/bottom)
|
data/README.md
CHANGED
@@ -8,12 +8,9 @@ Middleware that displays speed badge for every html page. Designed to work both
|
|
8
8
|
|
9
9
|
Well, not exactly mega urgent, but nice to see you are reading this.
|
10
10
|
|
11
|
-
There
|
11
|
+
There is one very simple change I would like to see ASAP: I would like to see `# frozen_string_literal: true` on every file we ship
|
12
12
|
|
13
|
-
|
14
|
-
2. I would like to see `# frozen_string_literal: true` on every file we ship
|
15
|
-
|
16
|
-
If you pick up either of these, be sure to amend the README in your PR AND add a Changelog.
|
13
|
+
If you pick up this task, be sure to amend the README in your PR AND add a Changelog.
|
17
14
|
|
18
15
|
#### Features
|
19
16
|
|
@@ -42,7 +42,7 @@ module Rack
|
|
42
42
|
if (MiniProfiler.config.authorization_mode == :whitelist && !MiniProfiler.request_authorized?)
|
43
43
|
# this is non-obvious, don't kill the profiling cookie on errors or short requests
|
44
44
|
# this ensures that stuff that never reaches the rails stack does not kill profiling
|
45
|
-
if status.to_i >= 200 && status.to_i < 300 && ((
|
45
|
+
if status.to_i >= 200 && status.to_i < 300 && ((Process.clock_gettime(Process::CLOCK_MONOTONIC) - @start) > 0.1)
|
46
46
|
discard_cookie!(headers)
|
47
47
|
end
|
48
48
|
else
|
@@ -149,7 +149,7 @@ module Rack
|
|
149
149
|
|
150
150
|
def call(env)
|
151
151
|
|
152
|
-
start =
|
152
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
153
153
|
client_settings = ClientSettings.new(env, @storage, start)
|
154
154
|
MiniProfiler.deauthorize_request if @config.authorization_mode == :whitelist
|
155
155
|
|
@@ -325,7 +325,7 @@ module Rack
|
|
325
325
|
|
326
326
|
page_struct = current.page_struct
|
327
327
|
page_struct[:user] = user(env)
|
328
|
-
page_struct[:root].record_time((
|
328
|
+
page_struct[:root].record_time((Process.clock_gettime(Process::CLOCK_MONOTONIC) - start) * 1000)
|
329
329
|
|
330
330
|
if flamegraph
|
331
331
|
body.close if body.respond_to? :close
|
@@ -366,7 +366,7 @@ module Rack
|
|
366
366
|
headers.delete('Date')
|
367
367
|
end
|
368
368
|
|
369
|
-
headers['X-MiniProfiler-Original-Cache-Control'] = headers['Cache-Control']
|
369
|
+
headers['X-MiniProfiler-Original-Cache-Control'] = headers['Cache-Control'] unless headers['Cache-Control'].nil?
|
370
370
|
headers['Cache-Control'] = "#{"no-store, " if config.disable_caching}must-revalidate, private, max-age=0"
|
371
371
|
|
372
372
|
# inject header
|
@@ -89,11 +89,11 @@ module Rack
|
|
89
89
|
parent_timer = Rack::MiniProfiler.current.current_timer
|
90
90
|
|
91
91
|
if type == :counter
|
92
|
-
start =
|
92
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
93
93
|
begin
|
94
94
|
self.send without_profiling, *args, &orig
|
95
95
|
ensure
|
96
|
-
duration_ms = (
|
96
|
+
duration_ms = (Process.clock_gettime(Process::CLOCK_MONOTONIC) - start).to_f * 1000
|
97
97
|
parent_timer.add_custom(name, duration_ms, Rack::MiniProfiler.current.page_struct )
|
98
98
|
end
|
99
99
|
else
|
@@ -131,9 +131,9 @@ module Rack
|
|
131
131
|
def counter(type, duration_ms=nil)
|
132
132
|
result = nil
|
133
133
|
if block_given?
|
134
|
-
start =
|
134
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
135
135
|
result = yield
|
136
|
-
duration_ms = (
|
136
|
+
duration_ms = (Process.clock_gettime(Process::CLOCK_MONOTONIC) - start).to_f * 1000
|
137
137
|
end
|
138
138
|
return result if current.nil? || !request_authorized?
|
139
139
|
current.current_timer.add_custom(type, duration_ms, current.page_struct)
|
@@ -139,10 +139,10 @@ module Rack
|
|
139
139
|
@auth_token_lock.synchronize {
|
140
140
|
token1, token2, cycle_at = @auth_token_cache[""]
|
141
141
|
|
142
|
-
unless cycle_at && (
|
142
|
+
unless cycle_at && (Float === cycle_at) && (cycle_at > Process.clock_gettime(Process::CLOCK_MONOTONIC))
|
143
143
|
token2 = token1
|
144
144
|
token1 = SecureRandom.hex
|
145
|
-
cycle_at =
|
145
|
+
cycle_at = Process.clock_gettime(Process::CLOCK_MONOTONIC) + Rack::MiniProfiler::AbstractStore::MAX_TOKEN_AGE
|
146
146
|
end
|
147
147
|
|
148
148
|
@auth_token_cache[""] = [token1, token2, cycle_at]
|
@@ -67,7 +67,7 @@ module Rack
|
|
67
67
|
key1 = nil unless key1 && key1.length == 32
|
68
68
|
key2 = nil unless key2 && key2.length == 32
|
69
69
|
|
70
|
-
if key1 && cycle_at && (cycle_at >
|
70
|
+
if key1 && cycle_at && (cycle_at > Process.clock_gettime(Process::CLOCK_MONOTONIC))
|
71
71
|
return [key1,key2].compact
|
72
72
|
end
|
73
73
|
end
|
@@ -77,7 +77,7 @@ module Rack
|
|
77
77
|
# cycle keys
|
78
78
|
key2 = key1
|
79
79
|
key1 = SecureRandom.hex
|
80
|
-
cycle_at =
|
80
|
+
cycle_at = Process.clock_gettime(Process::CLOCK_MONOTONIC) + timeout
|
81
81
|
|
82
82
|
@client.set("#{@prefix}-tokens", Marshal::dump([key1, key2, cycle_at]))
|
83
83
|
|
@@ -70,7 +70,7 @@ module Rack
|
|
70
70
|
cleanup_cycle = args.fetch(:cleanup_cycle) { CLEANUP_CYCLE }
|
71
71
|
t = CacheCleanupThread.new(cleanup_interval, cleanup_cycle, self) do |t|
|
72
72
|
until Thread.current[:should_exit] do
|
73
|
-
|
73
|
+
CacheCleanupThread.current.sleepy_run
|
74
74
|
end
|
75
75
|
end
|
76
76
|
at_exit { t[:should_exit] = true }
|
@@ -115,7 +115,7 @@ module Rack
|
|
115
115
|
end
|
116
116
|
|
117
117
|
def cleanup_cache
|
118
|
-
expire_older_than = ((
|
118
|
+
expire_older_than = ((Process.clock_gettime(Process::CLOCK_MONOTONIC) - @expires_in_seconds) * 1000).to_i
|
119
119
|
@timer_struct_lock.synchronize {
|
120
120
|
@timer_struct_cache.delete_if { |k, v| v[:started] < expire_older_than }
|
121
121
|
}
|
@@ -124,10 +124,10 @@ module Rack
|
|
124
124
|
def allowed_tokens
|
125
125
|
@token_lock.synchronize do
|
126
126
|
|
127
|
-
unless @cycle_at && (@cycle_at >
|
127
|
+
unless @cycle_at && (@cycle_at > Process.clock_gettime(Process::CLOCK_MONOTONIC))
|
128
128
|
@token2 = @token1
|
129
129
|
@token1 = SecureRandom.hex
|
130
|
-
@cycle_at =
|
130
|
+
@cycle_at = Process.clock_gettime(Process::CLOCK_MONOTONIC) + Rack::MiniProfiler::AbstractStore::MAX_TOKEN_AGE
|
131
131
|
end
|
132
132
|
|
133
133
|
[@token1, @token2].compact
|
@@ -32,7 +32,7 @@ module Rack
|
|
32
32
|
def set_unviewed(user, id)
|
33
33
|
key = user_key(user)
|
34
34
|
if redis.exists(prefixed_id(id))
|
35
|
-
expire_at =
|
35
|
+
expire_at = Process.clock_gettime(Process::CLOCK_MONOTONIC).to_i + redis.ttl(prefixed_id(id))
|
36
36
|
redis.zadd(key, expire_at, id)
|
37
37
|
end
|
38
38
|
redis.expire(key, @expires_in_seconds)
|
@@ -43,7 +43,7 @@ module Rack
|
|
43
43
|
redis.del(key)
|
44
44
|
ids.each do |id|
|
45
45
|
if redis.exists(prefixed_id(id))
|
46
|
-
expire_at =
|
46
|
+
expire_at = Process.clock_gettime(Process::CLOCK_MONOTONIC).to_i + redis.ttl(prefixed_id(id))
|
47
47
|
redis.zadd(key, expire_at, id)
|
48
48
|
end
|
49
49
|
end
|
@@ -57,7 +57,7 @@ module Rack
|
|
57
57
|
# Remove expired ids from the unviewed sorted set and return the remaining ids
|
58
58
|
def get_unviewed_ids(user)
|
59
59
|
key = user_key(user)
|
60
|
-
redis.zremrangebyscore(key, '-inf',
|
60
|
+
redis.zremrangebyscore(key, '-inf', Process.clock_gettime(Process::CLOCK_MONOTONIC).to_i)
|
61
61
|
redis.zrevrangebyscore(key, '+inf', '-inf')
|
62
62
|
end
|
63
63
|
|
@@ -8,7 +8,7 @@ module Rack
|
|
8
8
|
@parent = parent
|
9
9
|
@page = page
|
10
10
|
@type = type
|
11
|
-
start_millis = ((
|
11
|
+
start_millis = ((Process.clock_gettime(Process::CLOCK_MONOTONIC) * 1000).to_i - page[:started]) - duration_ms
|
12
12
|
super(
|
13
13
|
:type => type,
|
14
14
|
:start_milliseconds => start_millis,
|
@@ -11,7 +11,7 @@ module Rack
|
|
11
11
|
def initialize(env)
|
12
12
|
timer_id = MiniProfiler.generate_id
|
13
13
|
page_name = env['PATH_INFO']
|
14
|
-
started_at = (
|
14
|
+
started_at = (Process.clock_gettime(Process::CLOCK_MONOTONIC) * 1000).to_i
|
15
15
|
machine_name = env['SERVER_NAME']
|
16
16
|
super(
|
17
17
|
:id => timer_id,
|
@@ -12,7 +12,7 @@ module Rack
|
|
12
12
|
attr_accessor :children_duration
|
13
13
|
|
14
14
|
def initialize(name, page, parent)
|
15
|
-
start_millis = (
|
15
|
+
start_millis = (Process.clock_gettime(Process::CLOCK_MONOTONIC) * 1000).to_i - page[:started]
|
16
16
|
depth = parent ? parent.depth + 1 : 0
|
17
17
|
super(
|
18
18
|
:id => MiniProfiler.generate_id,
|
@@ -39,7 +39,7 @@ module Rack
|
|
39
39
|
:custom_timings => {}
|
40
40
|
)
|
41
41
|
@children_duration = 0
|
42
|
-
@start =
|
42
|
+
@start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
43
43
|
@parent = parent
|
44
44
|
@page = page
|
45
45
|
end
|
@@ -117,7 +117,7 @@ module Rack
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def record_time(milliseconds = nil)
|
120
|
-
milliseconds ||= (
|
120
|
+
milliseconds ||= (Process.clock_gettime(Process::CLOCK_MONOTONIC) - @start) * 1000
|
121
121
|
self[:duration_milliseconds] = milliseconds
|
122
122
|
self[:is_trivial] = true if milliseconds < self[:trivial_duration_threshold_milliseconds]
|
123
123
|
self[:duration_without_children_milliseconds] = milliseconds - @children_duration
|
@@ -32,7 +32,7 @@ module Rack
|
|
32
32
|
|
33
33
|
@parent = parent
|
34
34
|
@page = page
|
35
|
-
start_millis = ((
|
35
|
+
start_millis = ((Process.clock_gettime(Process::CLOCK_MONOTONIC) * 1000).to_i - page[:started]) - duration_ms
|
36
36
|
super(
|
37
37
|
:execute_type => 3, # TODO
|
38
38
|
:formatted_command_string => query,
|
@@ -28,7 +28,7 @@ module Rack
|
|
28
28
|
return log_without_miniprofiler(*args, &block) unless SqlPatches.should_measure?
|
29
29
|
|
30
30
|
sql, name, binds = args
|
31
|
-
start =
|
31
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
32
32
|
rval = log_without_miniprofiler(*args, &block)
|
33
33
|
|
34
34
|
# Don't log schema queries if the option is set
|
data/lib/patches/db/mysql2.rb
CHANGED
@@ -5,7 +5,7 @@ class Mysql2::Result
|
|
5
5
|
def each(*args, &blk)
|
6
6
|
return each_without_profiling(*args, &blk) unless defined?(@miniprofiler_sql_id)
|
7
7
|
|
8
|
-
start =
|
8
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
9
9
|
result = each_without_profiling(*args,&blk)
|
10
10
|
elapsed_time = SqlPatches.elapsed_time(start)
|
11
11
|
|
data/lib/patches/db/neo4j.rb
CHANGED
@@ -3,7 +3,7 @@ class Neo4j::Core::Query
|
|
3
3
|
|
4
4
|
def response
|
5
5
|
return @response if @response
|
6
|
-
start =
|
6
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
7
7
|
rval = response_without_miniprofiler
|
8
8
|
elapsed_time = SqlPatches.elapsed_time(start)
|
9
9
|
Rack::MiniProfiler.record_sql(to_cypher, elapsed_time)
|
@@ -3,7 +3,7 @@ class ActiveRecord::Result
|
|
3
3
|
def each(&blk)
|
4
4
|
return each_without_profiling(&blk) unless defined?(@miniprofiler_sql_id)
|
5
5
|
|
6
|
-
start =
|
6
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
7
7
|
result = each_without_profiling(&blk)
|
8
8
|
elapsed_time = SqlPatches.elapsed_time(start)
|
9
9
|
@miniprofiler_sql_id.report_reader_duration(elapsed_time)
|
@@ -45,7 +45,7 @@ class ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter
|
|
45
45
|
def mp_profile_sql(sql, name, &blk)
|
46
46
|
return yield unless mp_should_measure?(name)
|
47
47
|
|
48
|
-
start =
|
48
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
49
49
|
result = yield
|
50
50
|
elapsed_time = SqlPatches.elapsed_time(start)
|
51
51
|
record = ::Rack::MiniProfiler.record_sql(sql, elapsed_time)
|
data/lib/patches/db/pg.rb
CHANGED
@@ -18,7 +18,7 @@ class PG::Result
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def mp_report_sql(&block)
|
21
|
-
start =
|
21
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
22
22
|
result = yield
|
23
23
|
elapsed_time = SqlPatches.elapsed_time(start)
|
24
24
|
@miniprofiler_sql_id.report_reader_duration(elapsed_time)
|
@@ -49,7 +49,7 @@ class PG::Connection
|
|
49
49
|
def exec(*args,&blk)
|
50
50
|
return exec_without_profiling(*args,&blk) unless SqlPatches.should_measure?
|
51
51
|
|
52
|
-
start =
|
52
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
53
53
|
result = exec_without_profiling(*args,&blk)
|
54
54
|
elapsed_time = SqlPatches.elapsed_time(start)
|
55
55
|
record = ::Rack::MiniProfiler.record_sql(args[0], elapsed_time)
|
@@ -61,7 +61,7 @@ class PG::Connection
|
|
61
61
|
def exec_prepared(*args,&blk)
|
62
62
|
return exec_prepared_without_profiling(*args,&blk) unless SqlPatches.should_measure?
|
63
63
|
|
64
|
-
start =
|
64
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
65
65
|
result = exec_prepared_without_profiling(*args,&blk)
|
66
66
|
elapsed_time = SqlPatches.elapsed_time(start)
|
67
67
|
mapped = args[0]
|
@@ -75,7 +75,7 @@ class PG::Connection
|
|
75
75
|
def send_query_prepared(*args,&blk)
|
76
76
|
return send_query_prepared_without_profiling(*args,&blk) unless SqlPatches.should_measure?
|
77
77
|
|
78
|
-
start =
|
78
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
79
79
|
result = send_query_prepared_without_profiling(*args,&blk)
|
80
80
|
elapsed_time = SqlPatches.elapsed_time(start)
|
81
81
|
mapped = args[0]
|
@@ -89,7 +89,7 @@ class PG::Connection
|
|
89
89
|
def async_exec(*args,&blk)
|
90
90
|
return async_exec_without_profiling(*args,&blk) unless SqlPatches.should_measure?
|
91
91
|
|
92
|
-
start =
|
92
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
93
93
|
result = exec_without_profiling(*args,&blk)
|
94
94
|
elapsed_time = SqlPatches.elapsed_time(start)
|
95
95
|
record = ::Rack::MiniProfiler.record_sql(args[0], elapsed_time)
|
data/lib/patches/db/plucky.rb
CHANGED
@@ -27,7 +27,7 @@ class Plucky::Query
|
|
27
27
|
def profile_database_operation(method, message, *args, &blk)
|
28
28
|
return self.send("#{method.id2name}_without_profiling", *args, &blk) unless SqlPatches.should_measure?
|
29
29
|
|
30
|
-
start =
|
30
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
31
31
|
result = self.send("#{method.id2name}_without_profiling", *args, &blk)
|
32
32
|
elapsed_time = SqlPatches.elapsed_time(start)
|
33
33
|
|
data/lib/patches/db/riak.rb
CHANGED
@@ -5,7 +5,7 @@ class Riak::Multiget
|
|
5
5
|
def get_all(client, fetch_list)
|
6
6
|
return get_all_without_profiling(client, fetch_list) unless SqlPatches.should_measure?
|
7
7
|
|
8
|
-
start =
|
8
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
9
9
|
result = get_all_without_profiling(client, fetch_list)
|
10
10
|
elapsed_time = SqlPatches.elapsed_time(start)
|
11
11
|
record = ::Rack::MiniProfiler.record_sql("get_all size=#{fetch_list.size}", elapsed_time)
|
@@ -92,7 +92,7 @@ class Riak::Client
|
|
92
92
|
def profile(request, &blk)
|
93
93
|
return yield unless SqlPatches.should_measure?
|
94
94
|
|
95
|
-
start =
|
95
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
96
96
|
result = yield
|
97
97
|
elapsed_time = SqlPatches.elapsed_time(start)
|
98
98
|
record = ::Rack::MiniProfiler.record_sql(request, elapsed_time)
|
data/lib/patches/db/rsolr.rb
CHANGED
@@ -3,7 +3,7 @@ class RSolr::Connection
|
|
3
3
|
def execute_with_profiling(client, request_context)
|
4
4
|
return execute_without_profiling(client, request_context) unless SqlPatches.should_measure?
|
5
5
|
|
6
|
-
start =
|
6
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
7
7
|
result = execute_without_profiling(client, request_context)
|
8
8
|
elapsed_time = SqlPatches.elapsed_time(start)
|
9
9
|
|
data/lib/patches/sql_patches.rb
CHANGED
@@ -6,7 +6,7 @@ class SqlPatches
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.record_sql(statement, parameters = nil, &block)
|
9
|
-
start =
|
9
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
10
10
|
result = yield
|
11
11
|
record = ::Rack::MiniProfiler.record_sql(statement, elapsed_time(start), parameters)
|
12
12
|
return result, record
|
@@ -18,7 +18,7 @@ class SqlPatches
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.elapsed_time(start_time)
|
21
|
-
((
|
21
|
+
((Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time).to_f * 1000).round(1)
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.sql_patches
|
data/rack-mini-profiler.gemspec
CHANGED
@@ -21,11 +21,16 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_runtime_dependency 'rack', '>= 1.2.0'
|
22
22
|
s.required_ruby_version = '>= 1.9.3'
|
23
23
|
|
24
|
+
s.metadata = {
|
25
|
+
'source_code_uri' => 'https://github.com/MiniProfiler/rack-mini-profiler',
|
26
|
+
'changelog_uri' => 'https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md'
|
27
|
+
}
|
28
|
+
|
24
29
|
s.add_development_dependency 'rake', '< 11'
|
25
30
|
s.add_development_dependency 'rack-test'
|
26
31
|
s.add_development_dependency 'activerecord', '~> 3.0'
|
27
32
|
s.add_development_dependency 'dalli'
|
28
|
-
s.add_development_dependency 'rspec', '~>
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6.0'
|
29
34
|
s.add_development_dependency 'redis'
|
30
35
|
s.add_development_dependency 'sass'
|
31
36
|
s.add_development_dependency 'flamegraph'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-mini-profiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-11-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -88,14 +88,14 @@ dependencies:
|
|
88
88
|
requirements:
|
89
89
|
- - "~>"
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
91
|
+
version: 3.6.0
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
96
|
- - "~>"
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
98
|
+
version: 3.6.0
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: redis
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,7 +202,9 @@ files:
|
|
202
202
|
homepage: http://miniprofiler.com
|
203
203
|
licenses:
|
204
204
|
- MIT
|
205
|
-
metadata:
|
205
|
+
metadata:
|
206
|
+
source_code_uri: https://github.com/MiniProfiler/rack-mini-profiler
|
207
|
+
changelog_uri: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md
|
206
208
|
post_install_message:
|
207
209
|
rdoc_options: []
|
208
210
|
require_paths:
|