X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3f0ec839af28e56eb94bc9507ab59df1e670e59f..ca3d1e44680d06398885e551ecf4bb601c0801b6:/tools/keep-exercise/keep-exercise.go diff --git a/tools/keep-exercise/keep-exercise.go b/tools/keep-exercise/keep-exercise.go index a4684739e7..8fec51aeb9 100644 --- a/tools/keep-exercise/keep-exercise.go +++ b/tools/keep-exercise/keep-exercise.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + // Testing tool for Keep services. // // keepexercise helps measure throughput and test reliability under @@ -18,16 +22,20 @@ import ( "crypto/rand" "encoding/binary" "flag" + "fmt" "io" "io/ioutil" "log" "net/http" + "os" "time" - "git.curoverse.com/arvados.git/sdk/go/arvadosclient" - "git.curoverse.com/arvados.git/sdk/go/keepclient" + "git.arvados.org/arvados.git/sdk/go/arvadosclient" + "git.arvados.org/arvados.git/sdk/go/keepclient" ) +var version = "dev" + // Command line config knobs var ( BlockSize = flag.Int("block-size", keepclient.BLOCKSIZE, "bytes per read/write op") @@ -39,11 +47,20 @@ var ( StatsInterval = flag.Duration("stats-interval", time.Second, "time interval between IO stats reports, or 0 to disable") ServiceURL = flag.String("url", "", "specify scheme://host of a single keep service to exercise (instead of using all advertised services like normal clients)") ServiceUUID = flag.String("uuid", "", "specify UUID of a single advertised keep service to exercise") + getVersion = flag.Bool("version", false, "Print version information and exit.") ) func main() { flag.Parse() + // Print version information if requested + if *getVersion { + fmt.Printf("keep-exercise %s\n", version) + os.Exit(0) + } + + log.Printf("keep-exercise %s started", version) + arv, err := arvadosclient.MakeArvadosClient() if err != nil { log.Fatal(err)