query_track 0.0.6 → 0.0.7

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
  SHA256:
3
- metadata.gz: 782f50da026b1b0a7241e209ee87b0c342a96c1184d3631805d3085882f05e0f
4
- data.tar.gz: a481740e8d750ac48249da9ea7cfcb8bcf147f454cb5a031af3b4b497a3a24c3
3
+ metadata.gz: 5a5320848472a969d0dc55f439d35104de7d6ccfd9ca0fb95ea145f2d5022303
4
+ data.tar.gz: 76c6cb3371cd2b40d78cf457feef9f84f21d1f46dfe6bcb39be7734ba2974dde
5
5
  SHA512:
6
- metadata.gz: e6a216a576b4a22af5e59c994fbd1d060bbc0c7e7ba00fdaaac93aebe9d60e6f7d15afb15aa26e6b59e80984955d06931c745e8e067c9bf20b6450ca4f4942f1
7
- data.tar.gz: a6fcfe074573aa7ec5a21e7a1301d80200ddc75094d66d09a5eda217e3dd74a8c241a23cacb62760188220cbf09391e0763fe4676aec97bd8a9d1f5ef840b8f6
6
+ metadata.gz: b1e97dc237c4ff865286f48bed33996dcf3fb6c180bc0d491f38f3c3793cb7ee57fbd9eed640cc1943566171b387d1ecdca1df856c0d93ce3daa144aa9decc23
7
+ data.tar.gz: 67b0dd2dddf045db93614eea9584c692f5e8cae8b7cecc688730f85ce84849a5dba8537098251e12bcce09c56b372ac7212e33c96592818cc6d1831af3597991
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.0.7 2019-08-01
2
+
3
+ fixed view of duration seconds ([kirillshevch](https://github.com/kirillshevch/query_track/pull/8))
4
+
1
5
  # v0.0.6 2019-08-01
2
6
 
3
7
  repush of 0.0.5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_track (0.0.6)
4
+ query_track (0.0.7)
5
5
  activesupport
6
6
  dry-configurable
7
7
  slack_hook
data/README.md CHANGED
@@ -26,7 +26,7 @@ Or install it yourself as:
26
26
 
27
27
  ### SQL Duration Limit
28
28
 
29
- Specify SQL duration query limit:
29
+ Specify SQL duration query limit (in seconds):
30
30
 
31
31
  ```ruby
32
32
  QueryTrack::Settings.configure do |config|
@@ -11,14 +11,18 @@ module QueryTrack
11
11
 
12
12
  return if under_filter?(caller)
13
13
 
14
- if event.duration > QueryTrack::Settings.config.duration
15
- QueryTrack::Notifications::Slack.new(event.payload[:sql], event.duration).call
16
- QueryTrack::Notifications::Log.new(event.payload[:sql], event.duration).call
14
+ if duration_seconds > QueryTrack::Settings.config.duration
15
+ QueryTrack::Notifications::Slack.new(event.payload[:sql], duration_seconds).call
16
+ QueryTrack::Notifications::Log.new(event.payload[:sql], duration_seconds).call
17
17
  end
18
18
  end
19
19
 
20
20
  private
21
21
 
22
+ def duration_seconds
23
+ event.duration / 1000
24
+ end
25
+
22
26
  def under_filter?(trace)
23
27
  QueryTrack::Filters.new(caller).call
24
28
  end
@@ -1,3 +1,3 @@
1
1
  module QueryTrack
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_track
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Shevchenko