Skip to content

Commit

Permalink
Merge branch 'main' into further-improve-value-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlymatthew authored Mar 6, 2024
2 parents b1331c8 + e3171af commit 86e929b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Appendable

[![discord](https://img.shields.io/badge/Join-Discord-%235865F2.svg)](https://discord.gg/q9PE76FxXw)

Appendable is an append-only, schema-less, daemon-less database.

Appendable doesn't require a conventional server, instead it generates an index
Expand Down
17 changes: 16 additions & 1 deletion examples/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2>Query</h2>
<button id="jsonTab">json</button>
<button id="jsTab">javascript</button>
<div id="editor" style="height: 400px; width: 628px"></div>
<h2>Results</h2>
<h2>Results - <span id="metrics"></span></h2>
<button id="execute">Execute</button>
<button id="next">Fetch more</button>
<pre id="results"></pre>
Expand All @@ -87,6 +87,21 @@ <h2>Results</h2>
<script src="appendable.min.js"></script>
<script src="editor.js"></script>
<script>
const fetchz = window.fetch;
let bytesReceived = 0;
let numRequests = 0;
window.fetch = async function (...args) {
const response = await fetchz(...args);

bytesReceived += parseInt(response.headers.get("content-length"));
numRequests++;

document.getElementById("metrics").innerHTML =
`${numRequests} requests, ${bytesReceived / 1000} kB received`;

return response;
};

Appendable.init(
"green_tripdata_2023-01.jsonl",
"green_tripdata_2023-01.index",
Expand Down

0 comments on commit 86e929b

Please sign in to comment.