Socket
Socket
Sign inDemoInstall

lmdb

Package Overview
Dependencies
Maintainers
3
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lmdb - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

18

benchmark/index.js

@@ -15,3 +15,3 @@ 'use strict';

const { open } = require('..');
const { open, lmdbNativeFunctions } = require('..');
var env;

@@ -115,3 +115,3 @@ var dbi;

}
lmdbNativeFunctions()
var txn;

@@ -143,8 +143,18 @@

});
suite.on('complete', function () {
suite.on('complete', async function () {
console.log('Fastest is ' + this.filter('fastest').map('name'));
var numCPUs = require('os').cpus().length;
console.log('Test opening/closing threads ' + numCPUs + ' threads');
for (var i = 0; i < numCPUs; i++) {
var worker = new Worker(__filename);
await new Promise(r => setTimeout(r,30));
worker.terminate();
if ((i % 2) == 0)
await new Promise(r => setTimeout(r,30));
//var worker = fork();
}
console.log('Now will run benchmark across ' + numCPUs + ' threads');
for (var i = 0; i < numCPUs; i++) {
var worker = new Worker(__filename);
//var worker = fork();

@@ -172,3 +182,3 @@ }

});
// suite.add('get', getData);
suite.add('get', getData);
suite.add('getBinaryFast', getBinaryFast);

@@ -175,0 +185,0 @@ suite.on('cycle', function (event) {

{
"name": "lmdb",
"author": "Kris Zyp",
"version": "1.6.0",
"version": "1.6.1",
"description": "Simple, efficient, scalable data store wrapper for LMDB",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -325,2 +325,27 @@ 'use strict';

});
it('should handle open iterators and cursor renewal', async function() {
let data1 = {foo: 1, bar: true};
let data2 = {foo: 2, bar: false};
let data3 = {foo: 3, bar: false};
db2.put('key1', data1);
db.put('key1', data1);
db.put('key2', data2);
await db.put('key3', data3);
let it1 = db.getRange({start:'key', end:'keyz'})[Symbol.iterator]();
let it2 = db2.getRange({start:'key', end:'keyz'})[Symbol.iterator]();
let it3 = db.getRange({start:'key', end:'keyz'})[Symbol.iterator]();
it1.return();
it2.return();
await new Promise(resolve => setTimeout(resolve, 10));
it1 = db.getRange({start:'key', end:'keyz'})[Symbol.iterator]();
it2 = db2.getRange({start:'key', end:'keyz'})[Symbol.iterator]();
let it4 = db.getRange({start:'key', end:'keyz'})[Symbol.iterator]();
let it5 = db2.getRange({start:'key', end:'keyz'})[Symbol.iterator]();
await new Promise(resolve => setTimeout(resolve, 20));
it4.return()
it5.return()
it1.return()
it2.return()
it3.return()
});
it('should iterate over dupsort query, with removal', async function() {

@@ -554,3 +579,2 @@ let data1 = {foo: 1, bar: true}

it.skip('read and write with binary methods', async function() {
debugger
let dbBinary = db.openDB(Object.assign({

@@ -557,0 +581,0 @@ name: 'mydb6',

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc