Skip to content

Subleveldown is now unnecessary, and it can be replaced with keypaths #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions benches/DB1KiB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ async function main() {
const summary = await b.suite(
'DB1KiB',
b.add('get 1 KiB of data', async () => {
await db.put([], '1kib', data1KiB, true);
await db.put('1kib', data1KiB, true);
return async () => {
await db.get([], '1kib', true);
await db.get('1kib', true);
};
}),
b.add('put 1 KiB of data', async () => {
await db.put([], '1kib', data1KiB, true);
await db.put('1kib', data1KiB, true);
}),
b.add('put zero data', async () => {
await db.put([], '0', data0, true);
await db.put('0', data0, true);
}),
b.add('put zero data then del', async () => {
await db.put([], '0', data0, true);
await db.del([], '0');
await db.put('0', data0, true);
await db.del('0');
}),
b.cycle(),
b.complete(),
Expand Down
12 changes: 6 additions & 6 deletions benches/DB1MiB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ async function main() {
const summary = await b.suite(
'DB1MiB',
b.add('get 1 MiB of data', async () => {
await db.put([], '1kib', data1MiB, true);
await db.put('1kib', data1MiB, true);
return async () => {
await db.get([], '1kib', true);
await db.get('1kib', true);
};
}),
b.add('put 1 MiB of data', async () => {
await db.put([], '1kib', data1MiB, true);
await db.put('1kib', data1MiB, true);
}),
b.add('put zero data', async () => {
await db.put([], '0', data0, true);
await db.put('0', data0, true);
}),
b.add('put zero data then del', async () => {
await db.put([], '0', data0, true);
await db.del([], '0');
await db.put('0', data0, true);
await db.del('0');
}),
b.cycle(),
b.complete(),
Expand Down
86 changes: 0 additions & 86 deletions benches/DBLevel.ts

This file was deleted.

2 changes: 0 additions & 2 deletions benches/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import fs from 'fs';
import si from 'systeminformation';
import DB1KiBBench from './DB1KiB';
import DB1MiBBench from './DB1MiB';
import DBLevelBench from './DBLevel';

async function main(): Promise<void> {
await DB1KiBBench();
await DB1MiBBench();
await DBLevelBench();
const systemData = await si.get({
cpu: '*',
osInfo: 'platform, distro, release, kernel, arch',
Expand Down
10 changes: 5 additions & 5 deletions benches/results/DB1KiB.chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</head>
<body>
<div style="max-width: 800px">
<canvas id="chart1648010273459" width="16" height="9"></canvas>
<canvas id="chart1648386139867" width="16" height="9"></canvas>
</div>
<script>
const format = (num) => {
Expand All @@ -34,10 +34,10 @@

return chunked.map((chunk) => chunk.join("")).join(" ");
};
const ctx1648010273459 = document
.getElementById("chart1648010273459")
const ctx1648386139867 = document
.getElementById("chart1648386139867")
.getContext("2d");
const chart1648010273459 = new Chart(ctx1648010273459, {
const chart1648386139867 = new Chart(ctx1648386139867, {
type: "bar",
data: {
labels: [
Expand All @@ -48,7 +48,7 @@
],
datasets: [
{
data: [50696, 32195, 35092, 17442],
data: [51798, 28434, 31271, 15278],
backgroundColor: [
"rgba(63, 142, 252, 0.8)",
"rgba(116, 165, 127, 0.8)",
Expand Down
Loading