From 36e855609d5de82d94a8ee7e483198a76f775e63 Mon Sep 17 00:00:00 2001 From: Ekaterina Pavlova Date: Wed, 23 Oct 2024 21:41:41 +0300 Subject: [PATCH] cli: add `workers` and `searchers` flags to `upload-bin` command Number of workers to fetch, upload and search blocks concurrently is now configurable. Close #3641 Signed-off-by: Ekaterina Pavlova --- cli/util/convert.go | 12 +++++++++++- cli/util/uploader.go | 15 ++++++--------- docs/neofs-blockstorage.md | 4 +++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/cli/util/convert.go b/cli/util/convert.go index 23959a533..66b1f42ee 100644 --- a/cli/util/convert.go +++ b/cli/util/convert.go @@ -76,6 +76,16 @@ func NewCommands() []*cli.Command { Usage: "Size of index file", Value: 128000, }, + &cli.UintFlag{ + Name: "workers", + Usage: "Number of workers to fetch and upload blocks concurrently", + Value: 50, + }, + &cli.UintFlag{ + Name: "searchers", + Usage: "Number of concurrent searches for blocks", + Value: 20, + }, }, options.RPC...) uploadBinFlags = append(uploadBinFlags, options.Wallet...) return []*cli.Command{ @@ -158,7 +168,7 @@ func NewCommands() []*cli.Command { { Name: "upload-bin", Usage: "Fetch blocks from RPC node and upload them to the NeoFS container", - UsageText: "neo-go util upload-bin --fs-rpc-endpoint [,[...]] --container --block-attribute block --index-attribute index --rpc-endpoint [--timeout