This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "hyperswarm-replication-test", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "keywords": [], | |
| "author": "", | |
| "license": "MIT", | |
| "dependencies": { | |
| "@hyperswarm/replicator": "^1.1.0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NANOBENCH version 2 | |
| > /usr/bin/node bench.js | |
| # write fs 5000 * 4K sequentially | |
| ok ~262 ms (0 s + 261710236 ns) | |
| # write hyperdrive 5000 * 4K sequentially | |
| ok ~3.65 s (3 s + 653388561 ns) | |
| # write client 5000 * 4K sequentially |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # put this in ~/.config/systemd/user/battery-warn.service | |
| # and adjust the line in exec-start | |
| [Unit] | |
| Description=Battery warning | |
| [Service] | |
| Type=oneshot | |
| Environment="DISPLAY=:0" "XAUTHORITY=/home/bit/.Xauthority" | |
| ExecStart=/home/.../battery.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| message Entry { | |
| message Feed { | |
| required bytes key = 1; | |
| } | |
| message Feeds { | |
| repeated Feed feeds = 1; | |
| optional Feed contentFeed = 2; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var flatten = require('.') | |
| var bulk = require('bulk-write-stream') | |
| var stream = bulk.obj(flatten(write)) | |
| function write(batch, cb) { | |
| batch.forEach(function(obj) { | |
| console.log(obj) | |
| }) | |
| cb(null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var hyperdb = require('hyperdb') | |
| var sub = require('subhyperdb') | |
| var hyperdrive = require('hyperdrive') | |
| var hypergraph = require('hyper-graph-db') | |
| var hyperdriveMessages = require('hyperdrive/lib/messages') | |
| var dbName = process.argv[2] | |
| var op = process.argv[3] | |
| if (op !== 'read' && op !== 'write') { |
NewerOlder