Skip to content

Commit

Permalink
Merge pull request #12 from MatrixAI/nosubleveldown
Browse files Browse the repository at this point in the history
Subleveldown is now unnecessary, and it can be replaced with keypaths
  • Loading branch information
CMCDragonkai committed Mar 27, 2022
2 parents 213efc6 + d4fd1d7 commit dcf70c2
Show file tree
Hide file tree
Showing 20 changed files with 1,844 additions and 2,555 deletions.
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

0 comments on commit dcf70c2

Please sign in to comment.