presto-metrics 0.6.1 → 0.6.2
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/README.md +9 -5
- data/Rakefile +15 -0
- data/lib/presto/metrics/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed7caf06b33dc66c0a471ad821ce1424b29e443710b6845d38c65aa9dcb690bf
|
|
4
|
+
data.tar.gz: ae4b548f513909d15db4e2bc55f069192c3d2d0fd8e8a5e4ebb8a6058a9e3fd8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 157cebf9b3cd905afdbe68822ff9c17c437004e9be76e9f45fb9ce9a27baedbcae10f9f887b5bd6647cf53fa48d64ea6bcb020b6a1e8bc3d92b42ae2d86b24d1
|
|
7
|
+
data.tar.gz: 8c5f62072e7633d4230d52efc3ac2ab426f370f7dadee4d0a3770480f0bd3519b3dd842bfabae8137ee17b7b74e70d1278193c314f0c89d43a90b8fd8e3c3426
|
data/README.md
CHANGED
|
@@ -29,7 +29,7 @@ require 'presto/metrics'
|
|
|
29
29
|
client = Presto::Metrics::Client.new # Access to http://localhost:8080 in default
|
|
30
30
|
|
|
31
31
|
# Alternatively, you can specify the host name and port number to use
|
|
32
|
-
client = Presto::Metrics::Client.new(:host => "localhost", :port=>8080)
|
|
32
|
+
client = Presto::Metrics::Client.new(:host => "localhost", :port=>8080)
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
client.os_metrics
|
|
@@ -205,7 +205,7 @@ pp client.gc_g1_metrics
|
|
|
205
205
|
# Retrieve the JSON representation of JMX properties
|
|
206
206
|
client.get_mbean_json("java.lang:Type=Memory")
|
|
207
207
|
|
|
208
|
-
# Pretty print
|
|
208
|
+
# Pretty print
|
|
209
209
|
require 'pp'
|
|
210
210
|
pp c.memory_usage_metrics
|
|
211
211
|
#{
|
|
@@ -253,8 +253,12 @@ irb> load "presto/metrics/client.rb"
|
|
|
253
253
|
|
|
254
254
|
|
|
255
255
|
### Releasing a new version
|
|
256
|
+
|
|
257
|
+
Releases are published to RubyGems automatically via [rubygems/release-gem](https://github.com/rubygems/release-gem) when a version tag is pushed.
|
|
258
|
+
`bundle exec rake release` is no longer required manually — CI runs it internally.
|
|
259
|
+
|
|
256
260
|
```
|
|
257
|
-
|
|
258
|
-
# Publish to RubyGem
|
|
259
|
-
$ bundle exec rake release
|
|
261
|
+
$ bundle exec rake bump[X.Y.Z]
|
|
260
262
|
```
|
|
263
|
+
|
|
264
|
+
This updates `lib/presto/metrics/version.rb`, commits the change, creates a `vX.Y.Z` tag, and pushes both — triggering CI to publish to RubyGems automatically.
|
data/Rakefile
CHANGED
|
@@ -9,3 +9,18 @@ desc "Open an irb session preloaded with this library"
|
|
|
9
9
|
task :console do
|
|
10
10
|
sh "irb -I lib -r presto/metrics.rb"
|
|
11
11
|
end
|
|
12
|
+
|
|
13
|
+
desc "Bump version, commit, tag, and push to trigger CI release. Usage: rake bump[X.Y.Z]"
|
|
14
|
+
task :bump, [:version] do |_, args|
|
|
15
|
+
version = args[:version] or raise "Usage: rake bump[X.Y.Z]"
|
|
16
|
+
|
|
17
|
+
file = "lib/presto/metrics/version.rb"
|
|
18
|
+
content = File.read(file).gsub(/VERSION = ".*"/, %(VERSION = "#{version}"))
|
|
19
|
+
File.write(file, content)
|
|
20
|
+
|
|
21
|
+
sh "git add #{file}"
|
|
22
|
+
sh "git commit -m 'chore: bump version to #{version}'"
|
|
23
|
+
sh "git tag v#{version}"
|
|
24
|
+
sh "git push origin master"
|
|
25
|
+
sh "git push origin v#{version}"
|
|
26
|
+
end
|