cmetrics 0.1.4 → 0.1.5

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: caa39014510bd34dc658bb6e8f1fa555e792d113d0fee18024e387595a6a4b84
4
- data.tar.gz: 9af18715cb13b236b05c3210bbadc211a569ad4abef8fcd923af55621a2a7e4f
3
+ metadata.gz: 361bb2d812b12da260716172fe76c863c219262c499eedbbeba103b0c06f96df
4
+ data.tar.gz: 037562a3edf92bb19db31b2642bc8907d6e99dd21cd61a812c754508f8dd21cd
5
5
  SHA512:
6
- metadata.gz: c4caa6d06d460e756761607d73c23fb50a881a9522c8f9e4bebcac444ba3e432f0bf101c70098a2f3d03bf29f8dbdb355194a68422339bee9220cf976289ee88
7
- data.tar.gz: 36679c7e06d428936ddfc345e7cbb1ec9a923571a19443e54df53bd2aa37467ebd21e3a5bd67c571431e6be5851dff73e05a977a2c5fa492a72527105732ad1a
6
+ metadata.gz: d2ac8990af70be9e24984402b5bda5e3ac34a84075fd9051564b5e79d35e24c678c1f413f6064f9df9c5c08df2bf62c8c9d1ab1197abd84d072aaae24d99290c
7
+ data.tar.gz: 94dd6beaf0ef980bca11ec2b076582f14843560e8f737ee72cdda85de550d8bdf6506dde3d7a11768dac29fbcebc8a2c6a5ade527c03fe12c904a90af8b2b345
data/README.md CHANGED
@@ -6,6 +6,12 @@
6
6
 
7
7
  A Ruby binding for [cmetrics](https://github.com/calyptia/cmetrics).
8
8
 
9
+ ## Prerequisites
10
+
11
+ * Ruby 2.4 or later with its headers
12
+ * CMake 3.13 or later due to different directory TARGETS for bundled cmetrics installation
13
+ * gcc or clang or some equivalents toolchain
14
+
9
15
  ## Installation
10
16
 
11
17
  Add this line to your application's Gemfile:
@@ -151,6 +157,7 @@ require 'cmetrics'
151
157
  @wired_buffer = @gauge.to_msgpack + @counter.to_msgpack + @counter2.to_msgpack
152
158
  @serde = CMetrics::Serde.new
153
159
 
160
+ puts "-----Decode with procedural style-----"
154
161
  # Decode for the context 1
155
162
  @serde.from_msgpack(@wired_buffer)
156
163
  puts @serde.to_prometheus
@@ -160,6 +167,12 @@ puts @serde.to_prometheus
160
167
  # Decode for the context 3
161
168
  @serde.from_msgpack(@wired_buffer)
162
169
  puts @serde.to_prometheus
170
+
171
+ puts "-----Decode with streaming style-----"
172
+ # Or, use streaming style API
173
+ @serde.feed_each(@wired_buffer) do |serde|
174
+ puts serde.to_prometheus
175
+ end
163
176
  ```
164
177
 
165
178
  ## Development
@@ -548,7 +548,7 @@ rb_cmetrics_counter_add_label(VALUE self, VALUE rb_key, VALUE rb_value)
548
548
  value = RSTRING_PTR(rb_sym2str(rb_value));
549
549
  break;
550
550
  default:
551
- rb_raise(rb_eArgError, "key should be String or Symbol class instance.");
551
+ rb_raise(rb_eArgError, "value should be String or Symbol class instance.");
552
552
  }
553
553
  ret = cmt_label_add(cmetricsCounter->instance, key, value);
554
554
 
@@ -721,7 +721,7 @@ rb_cmetrics_gauge_add_label(VALUE self, VALUE rb_key, VALUE rb_value)
721
721
  value = RSTRING_PTR(rb_sym2str(rb_value));
722
722
  break;
723
723
  default:
724
- rb_raise(rb_eArgError, "key should be String or Symbol class instance.");
724
+ rb_raise(rb_eArgError, "value should be String or Symbol class instance.");
725
725
  }
726
726
 
727
727
  ret = cmt_label_add(cmetricsGauge->instance, key, value);
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CMetrics
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmetrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Hatake
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-07 00:00:00.000000000 Z
11
+ date: 2021-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler