prometheus-client-mmap 0.10.0 → 0.11.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f1ee3b09ba34253c97cbc24ea1423e5a9974e679fd4a0d63c596aae583440bd
4
- data.tar.gz: 2e2712829e334fb9d4a52658247f0e3a33b553ef40c7b9d67e008ff66d035661
3
+ metadata.gz: f2da1f2b3aafb4f99845a0d57a23b7ddd913cec6cd943ca18657c7743e309053
4
+ data.tar.gz: 9a757f3213a28d9b21ef0999c1c1f7756ee827dc5303c22d5dd700626010a177
5
5
  SHA512:
6
- metadata.gz: aa63176edd44f14614d1546fc9d3c467177e061182dc36594c3c23bcb074a6470e7b441bd36a72538ad41866d00741c7afd580a2131500eb72954e3c3458f084
7
- data.tar.gz: 8962a9d8d7df151b4645234291fb1a2f75f1caf9a99a9d5d755c7078cbb5705850864084cd0af5330dd2b346a5d2451000035a5e88798d5391bc06f37e26bab2
6
+ metadata.gz: 4d1b4457931f0c557debce08e9478bbdc3b933b15aa59df56eac89d65be7091b116b2ebef5fd853b96daa76a61d404b4b9ebf86920b8fccdd4b9a0d92051f66f
7
+ data.tar.gz: e64a0985943a3bd8460358ab905d9ac387e0b5b829b30ac652707915078d194fae84ab83a700ed6f702d5bae2576f669d983febc5d9479817cc1300926426d98
@@ -1,20 +1,17 @@
1
1
  #include <errno.h>
2
+ #include <hashmap.h>
3
+ #include <jsmn.h>
2
4
  #include <ruby.h>
3
5
  #include <ruby/intern.h>
4
-
5
6
  #include <sys/mman.h>
6
7
 
7
- #include <hashmap.h>
8
- #include <jsmn.h>
9
-
10
- #include "globals.h"
11
- #include "utils.h"
12
- #include "value_access.h"
13
-
14
8
  #include "file_parsing.h"
15
9
  #include "file_reading.h"
10
+ #include "globals.h"
16
11
  #include "mmap.h"
17
12
  #include "rendering.h"
13
+ #include "utils.h"
14
+ #include "value_access.h"
18
15
 
19
16
  VALUE MMAPED_FILE = Qnil;
20
17
 
@@ -1,9 +1,9 @@
1
+ #include "file_parsing.h"
2
+
1
3
  #include <hashmap.h>
2
4
  #include <jsmn.h>
3
- #include <ruby.h>
4
5
 
5
6
  #include "file_format.h"
6
- #include "file_parsing.h"
7
7
  #include "globals.h"
8
8
  #include "utils.h"
9
9
 
@@ -2,6 +2,7 @@
2
2
  #define FILE_PARSING_H
3
3
  #include <file_reading.h>
4
4
  #include <hashmap.h>
5
+ #include <ruby.h>
5
6
 
6
7
  typedef struct {
7
8
  char *json;
@@ -1,8 +1,8 @@
1
+ #include "file_reading.h"
2
+
1
3
  #include <errno.h>
2
4
  #include <fcntl.h>
3
- #include <ruby.h>
4
5
 
5
- #include "file_reading.h"
6
6
  #include "utils.h"
7
7
 
8
8
  static int file_open(file_t *source, const char *filepath) {
@@ -1,11 +1,11 @@
1
+ #include "mmap.h"
2
+
1
3
  #include <errno.h>
2
4
  #include <fcntl.h>
3
- #include <ruby.h>
4
5
  #include <ruby/util.h>
5
6
  #include <sys/mman.h>
6
7
 
7
8
  #include "file_format.h"
8
- #include "mmap.h"
9
9
  #include "utils.h"
10
10
 
11
11
  #if 0
@@ -257,7 +257,7 @@ VALUE mm_init(VALUE obj, VALUE fname) {
257
257
 
258
258
  if (reserve_mmap_file_bytes(fd, reserve_size) != 0) {
259
259
  close(fd);
260
- rb_raise(rb_eIOError, "Can't reserve %zu bytes for memory-mapped file", reserve_size);
260
+ rb_raise(rb_eIOError, "Can't reserve %zu bytes for memory-mapped file in %s", reserve_size, path);
261
261
  }
262
262
 
263
263
  addr = mmap(0, size, pmode, vscope, fd, offset);
@@ -1,9 +1,10 @@
1
+ #include "rendering.h"
2
+
1
3
  #include <float.h>
2
4
  #include <jsmn.h>
3
5
 
4
6
  #include "file_parsing.h"
5
7
  #include "globals.h"
6
- #include "rendering.h"
7
8
  #include "utils.h"
8
9
 
9
10
  #ifndef DBL_DECIMAL_DIG
@@ -1,8 +1,7 @@
1
- #include <errno.h>
2
- #include <ruby.h>
3
-
4
1
  #include "utils.h"
5
2
 
3
+ #include <errno.h>
4
+
6
5
  static void rb_save_exception(VALUE exception, VALUE message) {
7
6
  VALUE current_thread = rb_thread_current();
8
7
 
@@ -1,5 +1,6 @@
1
1
  #ifndef UNUSED_H
2
2
  #define UNUSED_H
3
+ #include <ruby.h>
3
4
 
4
5
  #ifdef UNUSED
5
6
  #elif defined(__GNUC__)
@@ -1,15 +1,13 @@
1
- #include <ruby.h>
2
- #include <ruby/intern.h>
1
+ #include "value_access.h"
3
2
 
4
3
  #include <errno.h>
5
4
  #include <fcntl.h>
5
+ #include <ruby/intern.h>
6
6
  #include <sys/mman.h>
7
7
  #include <unistd.h>
8
8
 
9
9
  #include "file_format.h"
10
10
  #include "mmap.h"
11
- #include "value_access.h"
12
-
13
11
  #include "utils.h"
14
12
 
15
13
  static void close_file(mm_ipc *i_mm) {
@@ -1,5 +1,6 @@
1
1
  #ifndef VALUE_ACCESS_H
2
2
  #define VALUE_ACCESS_H
3
+ #include <ruby.h>
3
4
 
4
5
  VALUE method_load_used(VALUE self);
5
6
 
Binary file
@@ -57,6 +57,10 @@ module Prometheus
57
57
  Prometheus::Client.logger.warn("munmap raised error #{e}")
58
58
  end
59
59
 
60
+ def inspect
61
+ "#<#{self.class}:0x#{(object_id << 1).to_s(16)}>"
62
+ end
63
+
60
64
  private
61
65
 
62
66
  def init_value(key)
@@ -1,5 +1,5 @@
1
1
  module Prometheus
2
2
  module Client
3
- VERSION = '0.10.0'.freeze
3
+ VERSION = '0.11.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus-client-mmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Schmidt
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-01-08 00:00:00.000000000 Z
12
+ date: 2020-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fuzzbert