@nxtedition/rocksdb 12.0.11 → 12.0.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.
Files changed (66) hide show
  1. package/benchmarks/get-many.mjs +18 -4
  2. package/binding.cc +2 -2
  3. package/binding.gyp +1 -1
  4. package/deps/rocksdb/rocksdb.gyp +2 -9
  5. package/package.json +8 -8
  6. package/prebuilds/darwin-arm64/@nxtedition+rocksdb.node +0 -0
  7. package/prebuilds/linux-x64/@nxtedition+rocksdb.node +0 -0
  8. package/tmp/{000235.sst → 000834.sst} +0 -0
  9. package/tmp/000835.sst +0 -0
  10. package/tmp/{000620.sst → 000873.sst} +0 -0
  11. package/tmp/000880.sst +0 -0
  12. package/tmp/000883.sst +0 -0
  13. package/tmp/{000290.sst → 000885.sst} +0 -0
  14. package/tmp/{000283.sst → 000888.sst} +0 -0
  15. package/tmp/{000282.sst → 000889.sst} +0 -0
  16. package/tmp/{000623.sst → 000891.sst} +0 -0
  17. package/tmp/001041.log +0 -0
  18. package/tmp/{000602.sst → 001045.sst} +0 -0
  19. package/tmp/{000291.sst → 001066.sst} +0 -0
  20. package/tmp/{000288.sst → 001069.sst} +0 -0
  21. package/tmp/{000287.sst → 001070.sst} +0 -0
  22. package/tmp/001071.sst +0 -0
  23. package/tmp/001072.sst +0 -0
  24. package/tmp/001073.sst +0 -0
  25. package/tmp/{000294.sst → 001074.sst} +0 -0
  26. package/tmp/001075.sst +0 -0
  27. package/tmp/001076.sst +0 -0
  28. package/tmp/001077.sst +0 -0
  29. package/tmp/001078.sst +0 -0
  30. package/tmp/001079.sst +0 -0
  31. package/tmp/001080.sst +0 -0
  32. package/tmp/001081.sst +0 -0
  33. package/tmp/001082.sst +0 -0
  34. package/tmp/001083.sst +0 -0
  35. package/tmp/001084.sst +0 -0
  36. package/tmp/001085.sst +0 -0
  37. package/tmp/001086.sst +0 -0
  38. package/tmp/001087.sst +0 -0
  39. package/tmp/001088.sst +0 -0
  40. package/tmp/001089.sst +0 -0
  41. package/tmp/001090.sst +0 -0
  42. package/tmp/001091.sst +0 -0
  43. package/tmp/001092.sst +0 -0
  44. package/tmp/001093.sst +0 -0
  45. package/tmp/001094.sst +0 -0
  46. package/tmp/CURRENT +1 -1
  47. package/tmp/MANIFEST-000986 +0 -0
  48. package/tmp/000236.sst +0 -0
  49. package/tmp/000594.log +0 -0
  50. package/tmp/000597.log +0 -0
  51. package/tmp/000617.sst +0 -0
  52. package/tmp/000618.sst +0 -0
  53. package/tmp/000619.sst +0 -0
  54. package/tmp/000621.sst +0 -0
  55. package/tmp/000622.sst +0 -0
  56. package/tmp/000624.sst +0 -0
  57. package/tmp/000625.sst +0 -0
  58. package/tmp/000626.sst +0 -0
  59. package/tmp/000627.sst +0 -0
  60. package/tmp/000628.sst +0 -0
  61. package/tmp/000629.sst +0 -0
  62. package/tmp/000630.sst +0 -0
  63. package/tmp/000631.sst +0 -0
  64. package/tmp/MANIFEST-000546 +0 -0
  65. /package/tmp/{OPTIONS-000455 → OPTIONS-000972} +0 -0
  66. /package/tmp/{OPTIONS-000548 → OPTIONS-000988} +0 -0
@@ -1,4 +1,4 @@
1
- import { bench, run } from 'mitata'
1
+ import { bench, run, group, boxplot } from 'mitata'
2
2
  import { RocksLevel } from '../index.js'
3
3
 
4
4
  const db = new RocksLevel('./tmp', {
@@ -25,7 +25,14 @@ const getOpts = {
25
25
  fillCache: true
26
26
  }
27
27
 
28
- for (let size = 1024 * 8; size <= 256 * 1024; size *= 2) {
28
+ const getUnsafeOpts = {
29
+ keyEncoding: 'buffer',
30
+ valueEncoding: 'buffer',
31
+ fillCache: true,
32
+ unsafe: true
33
+ }
34
+
35
+ for (let size = 1024; size <= 256 * 1024; size *= 2) {
29
36
  const keys = []
30
37
  for (let n = 0; n < 1024; n++) {
31
38
  const key = `${n}-${size}`
@@ -33,9 +40,16 @@ for (let size = 1024 * 8; size <= 256 * 1024; size *= 2) {
33
40
  await db.put(key, Buffer.allocUnsafe(size))
34
41
  }
35
42
 
36
- bench('_getManySync ' + size / 1024, async () => {
37
- db._getManySync(keys, getOpts).length
43
+ group(() => {
44
+ bench('_getManySync', async () => {
45
+ db._getManySync(keys, getOpts).length
46
+ })
47
+
48
+ bench('_getManySync unsafe', async () => {
49
+ db._getManySync(keys, getUnsafeOpts).length
50
+ })
38
51
  })
52
+
39
53
  }
40
54
 
41
55
  await run()
package/binding.cc CHANGED
@@ -1056,7 +1056,7 @@ NAPI_METHOD(db_get_many_sync) {
1056
1056
  NAPI_STATUS_THROWS(napi_get_null(env, &row));
1057
1057
  } else {
1058
1058
  ROCKS_STATUS_THROWS_NAPI(statuses[n]);
1059
- if (unsafe && values[n].size() > 32) {
1059
+ if (unsafe) {
1060
1060
  NAPI_STATUS_THROWS(ConvertUnsafe(env, std::move(values[n]), valueEncoding, row));
1061
1061
  } else {
1062
1062
  NAPI_STATUS_THROWS(Convert(env, std::move(values[n]), valueEncoding, row));
@@ -1143,7 +1143,7 @@ NAPI_METHOD(db_get_many) {
1143
1143
  NAPI_STATUS_RETURN(napi_get_null(env, &row));
1144
1144
  } else {
1145
1145
  ROCKS_STATUS_RETURN_NAPI(state.statuses[n]);
1146
- if (unsafe && state.values[n].size() > 32) {
1146
+ if (unsafe) {
1147
1147
  NAPI_STATUS_RETURN(ConvertUnsafe(env, std::move(state.values[n]), valueEncoding, row));
1148
1148
  } else {
1149
1149
  NAPI_STATUS_RETURN(Convert(env, std::move(state.values[n]), valueEncoding, row));
package/binding.gyp CHANGED
@@ -8,11 +8,11 @@
8
8
  [
9
9
  "OS == 'linux'",
10
10
  {
11
- "cflags": ["-march=znver1"],
12
11
  "include_dirs": [
13
12
  "/usr/lib/x86_64-linux-gnu/include",
14
13
  "/usr/lib/include",
15
14
  ],
15
+ "cflags": ["-march=znver1"],
16
16
  "ccflags": ["-flto", '-march=znver1'],
17
17
  "cflags!": ["-fno-exceptions"],
18
18
  "cflags_cc!": ["-fno-exceptions"],
@@ -111,15 +111,8 @@
111
111
  "/usr/lib/include",
112
112
  # "/usr/local/Cellar/jemalloc/5.3.0/include"
113
113
  ],
114
- "cflags": [
115
- "-msse4.2",
116
- "-mpclmul",
117
- "-mavx",
118
- "-mavx2",
119
- "-mbmi",
120
- "-mlzcnt"
121
- ],
122
- "ccflags": ["-flto"],
114
+ "cflags": ["-march=znver1"],
115
+ "ccflags": ["-flto", "-march=znver1"],
123
116
  "cflags!": ["-fno-exceptions"],
124
117
  "cflags_cc!": ["-fno-exceptions"],
125
118
  "ldflags": ["-flto", "-fuse-linker-plugin"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "12.0.11",
3
+ "version": "12.0.13",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -15,10 +15,10 @@
15
15
  "catering": "^2.1.1",
16
16
  "module-error": "^1.0.2",
17
17
  "napi-macros": "~2.2.2",
18
- "node-gyp-build": "^4.8.0"
18
+ "node-gyp-build": "^4.8.2"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/node": "^18.11.3",
21
+ "@types/node": "^22.7.4",
22
22
  "@voxpelli/tsconfig": "^4.0.0",
23
23
  "async-each": "^1.0.3",
24
24
  "cross-env": "^7.0.3",
@@ -27,15 +27,15 @@
27
27
  "du": "^1.0.0",
28
28
  "faucet": "^0.0.3",
29
29
  "glob": "^8.0.3",
30
- "lru-cache": "^11.0.0",
31
- "mitata": "^0.1.11",
30
+ "lru-cache": "^11.0.1",
31
+ "mitata": "^1.0.10",
32
32
  "mkfiletree": "^2.0.0",
33
- "node-gyp": "^9.3.0",
33
+ "node-gyp": "^10.2.0",
34
34
  "nyc": "^15.0.0",
35
35
  "readfiletree": "^1.0.0",
36
36
  "rimraf": "^3.0.0",
37
- "standard": "^17.0.0",
38
- "tape": "^5.7.5",
37
+ "standard": "^17.1.2",
38
+ "tape": "^5.9.0",
39
39
  "tempy": "^1.0.1"
40
40
  },
41
41
  "standard": {
Binary file
package/tmp/000835.sst ADDED
Binary file
Binary file
package/tmp/000880.sst ADDED
Binary file
package/tmp/000883.sst ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
package/tmp/001041.log ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
package/tmp/001071.sst ADDED
Binary file
package/tmp/001072.sst ADDED
Binary file
package/tmp/001073.sst ADDED
Binary file
Binary file
package/tmp/001075.sst ADDED
Binary file
package/tmp/001076.sst ADDED
Binary file
package/tmp/001077.sst ADDED
Binary file
package/tmp/001078.sst ADDED
Binary file
package/tmp/001079.sst ADDED
Binary file
package/tmp/001080.sst ADDED
Binary file
package/tmp/001081.sst ADDED
Binary file
package/tmp/001082.sst ADDED
Binary file
package/tmp/001083.sst ADDED
Binary file
package/tmp/001084.sst ADDED
Binary file
package/tmp/001085.sst ADDED
Binary file
package/tmp/001086.sst ADDED
Binary file
package/tmp/001087.sst ADDED
Binary file
package/tmp/001088.sst ADDED
Binary file
package/tmp/001089.sst ADDED
Binary file
package/tmp/001090.sst ADDED
Binary file
package/tmp/001091.sst ADDED
Binary file
package/tmp/001092.sst ADDED
Binary file
package/tmp/001093.sst ADDED
Binary file
package/tmp/001094.sst ADDED
Binary file
package/tmp/CURRENT CHANGED
@@ -1 +1 @@
1
- MANIFEST-000546
1
+ MANIFEST-000986
Binary file
package/tmp/000236.sst DELETED
Binary file
package/tmp/000594.log DELETED
Binary file
package/tmp/000597.log DELETED
Binary file
package/tmp/000617.sst DELETED
Binary file
package/tmp/000618.sst DELETED
Binary file
package/tmp/000619.sst DELETED
Binary file
package/tmp/000621.sst DELETED
Binary file
package/tmp/000622.sst DELETED
Binary file
package/tmp/000624.sst DELETED
Binary file
package/tmp/000625.sst DELETED
Binary file
package/tmp/000626.sst DELETED
Binary file
package/tmp/000627.sst DELETED
Binary file
package/tmp/000628.sst DELETED
Binary file
package/tmp/000629.sst DELETED
Binary file
package/tmp/000630.sst DELETED
Binary file
package/tmp/000631.sst DELETED
Binary file
Binary file
File without changes
File without changes