sidekiq-benchmark 0.7.2 → 0.7.3
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/.github/workflows/ruby.yml +21 -0
- data/.gitignore +1 -1
- data/Appraisals +7 -0
- data/Gemfile +2 -0
- data/README.md +3 -9
- data/lib/sidekiq-benchmark/version.rb +1 -1
- data/lib/sidekiq-benchmark/worker.rb +2 -2
- data/sidekiq-benchmark.gemspec +1 -0
- data/test/test_helper.rb +8 -8
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05ca155712f4d25af211627b1d7676b41ddff6c34e29d2c396607508d7959aa7
|
4
|
+
data.tar.gz: 8d458d2b8642b44e45aea45ecca27dd5136f0436c43e3ce9097d705b6fd54254
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aabb9212f2477a564a59b45eb73d4c8d59de726db640118615d99d6f30269e14912d55b7cb5d6890d3e16fadb8ceca675f568574d8f1c8c3e0d4dc37b259e0f3
|
7
|
+
data.tar.gz: 9b16419856878d0377e97413e0fdb18642c23fcdb84eaf35a081fe9b7a1e36535a69a99cc6102639ecf1dc457dc9d3e81e4fd8ec7365dea0eaaece158fbd695d
|
data/.github/workflows/ruby.yml
CHANGED
@@ -29,6 +29,27 @@ jobs:
|
|
29
29
|
run: bundle exec rake test
|
30
30
|
env:
|
31
31
|
REDIS_HOST: redis
|
32
|
+
ruby-latest-sidekiq-6:
|
33
|
+
runs-on: ubuntu-latest
|
34
|
+
container: ruby:latest
|
35
|
+
services:
|
36
|
+
redis:
|
37
|
+
image: redis
|
38
|
+
options: >-
|
39
|
+
--health-cmd "redis-cli ping"
|
40
|
+
--health-interval 10s
|
41
|
+
--health-timeout 5s
|
42
|
+
--health-retries 5
|
43
|
+
steps:
|
44
|
+
- uses: actions/checkout@v3
|
45
|
+
- name: bundle install
|
46
|
+
run: bundle install
|
47
|
+
- name: appraisal install
|
48
|
+
run: bundle exec appraisal install
|
49
|
+
- name: run tests
|
50
|
+
run: bundle exec appraisal sidekiq-6 rake test
|
51
|
+
env:
|
52
|
+
REDIS_HOST: redis
|
32
53
|
ruby-2:
|
33
54
|
runs-on: ubuntu-latest
|
34
55
|
container: ruby:2
|
data/.gitignore
CHANGED
data/Appraisals
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -13,11 +13,9 @@ Add this line to your application's Gemfile:
|
|
13
13
|
|
14
14
|
And then execute:
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
From version 0.5.0 works with Sidekiq 4.2 or newer
|
16
|
+
```shell
|
17
|
+
bundle
|
18
|
+
```
|
21
19
|
|
22
20
|
## Usage
|
23
21
|
|
@@ -69,10 +67,6 @@ end
|
|
69
67
|
|
70
68
|

|
71
69
|
|
72
|
-
### Sample Apps
|
73
|
-
|
74
|
-
[Heroku App](http://sidekiq-benchmark.herokuapp.com/benchmarks/generate)
|
75
|
-
|
76
70
|
## Testing sidekiq workers
|
77
71
|
|
78
72
|
When you use [Sidekiq::Testing](https://github.com/mperham/sidekiq/wiki/Testing) you
|
@@ -86,8 +86,8 @@ module Sidekiq
|
|
86
86
|
|
87
87
|
transaction.hincrby redis_keys[:stats], job_time_key, 1
|
88
88
|
|
89
|
-
transaction.hsetnx redis_keys[:total], "start_time", start_time
|
90
|
-
transaction.hset redis_keys[:total], "finish_time", finish_time
|
89
|
+
transaction.hsetnx redis_keys[:total], "start_time", start_time.to_s
|
90
|
+
transaction.hset redis_keys[:total], "finish_time", finish_time.to_s
|
91
91
|
|
92
92
|
transaction.expire redis_keys[:stats], REDIS_KEYS_TTL
|
93
93
|
transaction.expire redis_keys[:total], REDIS_KEYS_TTL
|
data/sidekiq-benchmark.gemspec
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
require 'minitest/autorun'
|
2
2
|
require 'minitest/pride'
|
3
3
|
|
4
|
-
require 'coveralls'
|
5
|
-
Coveralls.wear! do
|
6
|
-
add_filter '/test/'
|
7
|
-
end
|
8
|
-
|
9
4
|
ENV['RACK_ENV'] = 'test'
|
10
5
|
$TESTING = true
|
11
6
|
|
@@ -13,15 +8,21 @@ require 'bundler/setup'
|
|
13
8
|
require 'rack/test'
|
14
9
|
|
15
10
|
require 'sidekiq'
|
16
|
-
require 'sidekiq/util'
|
17
11
|
require 'sidekiq-benchmark'
|
18
12
|
|
19
13
|
require 'delorean'
|
20
14
|
require 'pry'
|
21
15
|
|
22
|
-
REDIS = Sidekiq::RedisConnection.create url: "redis://#{ENV['REDIS_HOST'] || 'localhost'}/15"
|
23
16
|
Bundler.require
|
24
17
|
|
18
|
+
Sidekiq.configure_server do |cfg|
|
19
|
+
cfg.redis = {url: "redis://#{ENV['REDIS_HOST'] || 'localhost'}/15"}
|
20
|
+
end
|
21
|
+
|
22
|
+
Sidekiq.configure_client do |cfg|
|
23
|
+
cfg.redis = {url: "redis://#{ENV['REDIS_HOST'] || 'localhost'}/15"}
|
24
|
+
end
|
25
|
+
|
25
26
|
module Sidekiq
|
26
27
|
module Benchmark
|
27
28
|
module Test
|
@@ -90,7 +91,6 @@ module Sidekiq
|
|
90
91
|
end
|
91
92
|
|
92
93
|
def self.flush_db
|
93
|
-
Sidekiq.redis = REDIS
|
94
94
|
Sidekiq.redis do |conn|
|
95
95
|
conn.flushdb
|
96
96
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-benchmark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Kosmatov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '2.1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: appraisal
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
description: Benchmarks for Sidekiq
|
126
140
|
email:
|
127
141
|
- key@kosmatov.ru
|
@@ -131,6 +145,7 @@ extra_rdoc_files: []
|
|
131
145
|
files:
|
132
146
|
- ".github/workflows/ruby.yml"
|
133
147
|
- ".gitignore"
|
148
|
+
- Appraisals
|
134
149
|
- Gemfile
|
135
150
|
- LICENSE.txt
|
136
151
|
- README.md
|
@@ -166,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
181
|
- !ruby/object:Gem::Version
|
167
182
|
version: '0'
|
168
183
|
requirements: []
|
169
|
-
rubygems_version: 3.3.
|
184
|
+
rubygems_version: 3.3.26
|
170
185
|
signing_key:
|
171
186
|
specification_version: 4
|
172
187
|
summary: Adds benchmarking methods to Sidekiq workers, keeps metrics and adds tab
|