Skip to content
Open
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
22 changes: 20 additions & 2 deletions config/testnet-bee-playground.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ clusters:
mode: node
bee-config: geth-playground
config: ng-bee-playground
count: 8
count: 16

# node-groups defines node groups that can be registered in the cluster
# node-groups may inherit it's configuration from already defined node-group and override specific fields from it
node-groups:
ng-bee-playground:
_inherit: default
persistence-enabled: true
persistence-enabled: false
image: ethersphere/bee:latest
ingress-class: "nginx-oss"
ingress-annotations:
Expand All @@ -57,6 +57,7 @@ bee-configs:
network-id: 12345
p2p-addr: :1634
password: "beekeeper"
payment-threshold: 108000000
storage-incentives-enable: true
swap-enable: true
verbosity: 5
Expand Down Expand Up @@ -200,3 +201,20 @@ checks:
duration: 12h
timeout: 13h
type: smoke
pg-storage-radius:
options:
reserve-capacity: 4000
target-fill-percent: 1.03
chunks-per-upload: 512
postage-depth: 22
postage-amount: 2073600000
postage-label: storage-radius
upload-timeout: 10m
upload-wave-pause: 5s
poll-interval: 2s
min-radius-wait: 5m
pushers-idle-wait: 2m
dilute-depth: 32
dilute-wait: 45m
timeout: 80m
type: storage-radius
2 changes: 2 additions & 0 deletions pkg/bee/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ type Client struct {
Status *StatusService
Stewardship *StewardshipService
Tags *TagsService
DebugStore *DebugStoreService
}

// NewClient constructs a new Client.
Expand Down Expand Up @@ -108,6 +109,7 @@ func newClient(apiURL *url.URL, httpClient *http.Client) (c *Client) {
c.Status = (*StatusService)(&c.service)
c.Stewardship = (*StewardshipService)(&c.service)
c.Tags = (*TagsService)(&c.service)
c.DebugStore = (*DebugStoreService)(&c.service)

return c
}
Expand Down
42 changes: 40 additions & 2 deletions pkg/bee/api/debugstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,49 @@ import (
type DebugStoreService service

// DebugStore represents DebugStore's response
type DebugStore map[string]int
type DebugStore struct {
Upload UploadStat `json:"upload"`
Pinning PinningStat `json:"pinning"`
Cache CacheStat `json:"cache"`
Reserve ReserveStat `json:"reserve"`
ChunkStore ChunkStoreStat `json:"chunkStore"`
}

// UploadStat reports the upload store, which holds chunks the pusher has not yet
// delivered to the network. PendingUpload is that undelivered backlog.
type UploadStat struct {
TotalUploaded int `json:"totalUploaded"`
TotalSynced int `json:"totalSynced"`
PendingUpload int `json:"pendingUpload"`
}

type PinningStat struct {
TotalCollections int `json:"totalCollections"`
TotalChunks int `json:"totalChunks"`
}

type CacheStat struct {
Size int `json:"size"`
Capacity int `json:"capacity"`
}

type ReserveStat struct {
SizeWithinRadius int `json:"sizeWithinRadius"`
TotalSize int `json:"totalSize"`
Capacity int `json:"capacity"`
LastBinIDs []uint64 `json:"lastBinIDs"`
Epoch uint64 `json:"epoch"`
}

type ChunkStoreStat struct {
TotalChunks int `json:"totalChunks"`
SharedSlots int `json:"sharedSlots"`
ReferenceCount int `json:"referenceCount"`
}

// GetDebugStore gets db indices
func (d *DebugStoreService) GetDebugStore(ctx context.Context) (DebugStore, error) {
resp := make(DebugStore)
var resp DebugStore
err := d.client.requestJSON(ctx, http.MethodGet, "/debugstore", nil, &resp)
return resp, err
}
1 change: 1 addition & 0 deletions pkg/bee/api/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type StatusResponse struct {
IsReachable bool `json:"isReachable"`
LastSyncedBlock uint64 `json:"lastSyncedBlock"`
CommittedDepth uint8 `json:"committedDepth"`
IsWarmingUp bool `json:"isWarmingUp"`
}

// Ping pings given node
Expand Down
Loading
Loading