pbwire 0.1.11 → 0.1.13
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/.diffend-unextracted-0 +2 -0
- data/README.md +9 -9
- data/ext/pbwire_ext/pbwire_ext.c +8 -3
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cb4f6b7cf39192a4b629a15021602052bfd92a018dada81f4b5a39d698b52d72
|
|
4
|
+
data.tar.gz: 4fb73360db872995f67944c183ca5d1bf471150f02efbdf3bde14ada104f8e16
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b9a4e29a0c6e99d8562324fde49a67eaacc250dbe2fdde6050df02958bda1744c44eeaca02c44a5686ba8d002a3c4c7c64f47dd1bc23a542cce79581396fbd6
|
|
7
|
+
data.tar.gz: 39d8591660b5fa4a37ea3c215a3c33ddf698f3c89ee0ad258aa85f6762066779e86d252f7f9cc990f3272fd4262f9009d63675da6044d866fd02b0cd2dce7b94
|
data/.diffend-unextracted-0
CHANGED
|
@@ -13,6 +13,7 @@ skipped a member with an empty or parent path: '../../src/schema.c'
|
|
|
13
13
|
skipped a member with an empty or parent path: '../../src/stream.c'
|
|
14
14
|
skipped a member with an empty or parent path: '../../src/text.c'
|
|
15
15
|
skipped a member with an empty or parent path: '../../src/wire.c'
|
|
16
|
+
skipped a member with an empty or parent path: '../../src/wkt.c'
|
|
16
17
|
|
|
17
18
|
GNU tar output:
|
|
18
19
|
tar: Removing leading `../../' from member names
|
|
@@ -29,4 +30,5 @@ tar: ../../src/schema.c: Member name contains '..'
|
|
|
29
30
|
tar: ../../src/stream.c: Member name contains '..'
|
|
30
31
|
tar: ../../src/text.c: Member name contains '..'
|
|
31
32
|
tar: ../../src/wire.c: Member name contains '..'
|
|
33
|
+
tar: ../../src/wkt.c: Member name contains '..'
|
|
32
34
|
tar: Exiting with failure status due to previous errors
|
data/README.md
CHANGED
|
@@ -185,14 +185,14 @@ source for all performance numbers; higher is better, MB/s over wire bytes:
|
|
|
185
185
|
|
|
186
186
|
| payload | op | pbwire-ruby (MB/s, x gem) | gem (MB/s) |
|
|
187
187
|
|---|---|---|---|
|
|
188
|
-
| 136 B | encode |
|
|
189
|
-
| 136 B | decode |
|
|
190
|
-
| 174 B | encode |
|
|
191
|
-
| 174 B | decode |
|
|
192
|
-
| 2469 B | encode |
|
|
193
|
-
| 2469 B | decode |
|
|
194
|
-
| 74913 B | encode |
|
|
195
|
-
| 74913 B | decode |
|
|
188
|
+
| 136 B | encode | 1015.0 (1.4x) | 741.1 |
|
|
189
|
+
| 136 B | decode | 462.9 (1.8x) | 263.5 |
|
|
190
|
+
| 174 B | encode | 956.9 (1.2x) | 803.2 |
|
|
191
|
+
| 174 B | decode | 514.3 (1.9x) | 267.4 |
|
|
192
|
+
| 2469 B | encode | 1473.1 (1.2x) | 1256.4 |
|
|
193
|
+
| 2469 B | decode | 970.6 (1.8x) | 528.9 |
|
|
194
|
+
| 74913 B | encode | 1582.4 (1.2x) | 1310.6 |
|
|
195
|
+
| 74913 B | decode | 1170.0 (1.7x) | 694.7 |
|
|
196
196
|
|
|
197
197
|
```shell
|
|
198
198
|
gem install google-protobuf
|
|
@@ -204,7 +204,7 @@ The win is architectural, not a micro-optimization:
|
|
|
204
204
|
- **Encoding** writes one pass from the C tree straight into the String that is
|
|
205
205
|
returned; there is no intermediate buffer and no per-field Ruby call.
|
|
206
206
|
- **Decoding** is one validating scan that records where each wire field lives;
|
|
207
|
-
the gem materializes every field
|
|
207
|
+
the gem materializes every field.
|
|
208
208
|
|
|
209
209
|
## Conformance
|
|
210
210
|
|
data/ext/pbwire_ext/pbwire_ext.c
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
#include <pbwire.h>
|
|
35
35
|
|
|
36
36
|
#include <stdint.h>
|
|
37
|
+
#include <stdio.h>
|
|
37
38
|
#include <stdlib.h>
|
|
38
39
|
#include <string.h>
|
|
39
40
|
|
|
@@ -1518,11 +1519,15 @@ schema_s_load(VALUE klass, VALUE bytes)
|
|
|
1518
1519
|
status = pbw_descriptor_set_load(RSTRING_PTR(bytes),
|
|
1519
1520
|
(size_t)RSTRING_LEN(bytes), &schema);
|
|
1520
1521
|
if (status != PBW_OK) {
|
|
1521
|
-
|
|
1522
|
+
/* the reason lives inside the schema: copy it before freeing */
|
|
1523
|
+
char reason[192];
|
|
1524
|
+
const char *why = pbw_schema_error(schema);
|
|
1525
|
+
|
|
1526
|
+
snprintf(reason, sizeof(reason), "%s",
|
|
1527
|
+
why != NULL ? why : "");
|
|
1522
1528
|
pbw_schema_free(schema);
|
|
1523
1529
|
rb_raise(eError, "descriptor set rejected: %s",
|
|
1524
|
-
reason
|
|
1525
|
-
: pbw_strerror(status));
|
|
1530
|
+
reason[0] != '\0' ? reason : pbw_strerror(status));
|
|
1526
1531
|
}
|
|
1527
1532
|
obj = typed_object_alloc(klass, &schema_data_type, (void **)&self);
|
|
1528
1533
|
self->holder = holder_new(schema);
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pbwire
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jinganix
|
|
@@ -29,6 +29,7 @@ files:
|
|
|
29
29
|
- "../../src/stream.c"
|
|
30
30
|
- "../../src/text.c"
|
|
31
31
|
- "../../src/wire.c"
|
|
32
|
+
- "../../src/wkt.c"
|
|
32
33
|
- README.md
|
|
33
34
|
- ext/pbwire_ext/extconf.rb
|
|
34
35
|
- ext/pbwire_ext/pbwire_ext.c
|
|
@@ -51,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
51
52
|
- !ruby/object:Gem::Version
|
|
52
53
|
version: '0'
|
|
53
54
|
requirements: []
|
|
54
|
-
rubygems_version:
|
|
55
|
+
rubygems_version: 4.0.20
|
|
55
56
|
specification_version: 4
|
|
56
57
|
summary: Dynamic protobuf over the pbwire C ABI, schema at runtime
|
|
57
58
|
test_files: []
|