Deepen supercomputer category with shared base and expanded APIs.
Adds supercomputer-base helpers, richer job/shard/steal/thermal modules, priority jobs, claimMatching, and bumps all 14 modules to 0.3.1. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -2,6 +2,7 @@ require('bare-process/global')
|
||||
const EventEmitter = require('bare-events')
|
||||
const b4a = require('b4a')
|
||||
const { initModuleSwarm, gossipSend } = require('../../_shared/p2p-bare.js')
|
||||
const { clusterStats } = require('../../_shared/supercomputer-base.js')
|
||||
|
||||
const PROTOCOL = 'disk-stripe/v1'
|
||||
|
||||
@@ -104,8 +105,17 @@ class HyperP2PDiskStripe extends EventEmitter {
|
||||
return this
|
||||
}
|
||||
|
||||
progress (stripeId) {
|
||||
const stripe = this._stripes.get(stripeId)
|
||||
if (!stripe) return 0
|
||||
return stripe.shards.size / stripe.pathCount
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return { ...this._stats, open: this._stripes.size, protocol: PROTOCOL }
|
||||
return clusterStats(this._stats, PROTOCOL, {
|
||||
open: this._stripes.size,
|
||||
diskBytes: this.clusterDiskBytes()
|
||||
})
|
||||
}
|
||||
|
||||
async close () {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hyper-p2p-disk-stripe",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "Striped block storage across peers for Bare/Pear P2P supercomputer mesh.",
|
||||
"main": "index.js",
|
||||
"type": "commonjs",
|
||||
|
||||
Reference in New Issue
Block a user