Skip to content
Snippets Groups Projects
Select Git revision
  • 2633752811e06cae61c2a34204b68e715283190e
  • release default
  • master protected
  • XX-4441
  • Jakub/rootless-CI
  • Anne/CI-Test
  • waitingRoundsRewrite
  • quantumSecure
  • fullRateLimit
  • XX-3564/TlsCipherSuite
  • hotfix/groupNotification
  • Josh/RateLimiting
  • debug/sourceOfErrors
  • XX-3540/TestCert
  • f76/error
  • notls
  • url-repo-rename
  • feature/dynamicAuthRemoval
  • jono/yaml
  • version-2_5_3
  • hotfix/signing
  • v3.13.0
  • v3.11.0
  • v3.10.0
  • v3.9.0
  • v3.7.0
  • v3.6.0
  • v3.5.0
  • v3.1.0
  • v2.2.8
  • v2.2.7
  • v2.1.0
  • v2.0.0
  • v1.7.0
  • v1.6.0
  • v1.5.0
  • v1.4.2
  • v1.4.1
  • v1.4.0
  • v1.3.2
  • v1.3.1
41 results

benchmark.go

Blame
  • benchmark.go 905 B
    package cmd
    
    import (
    	"gitlab.com/privategrity/server/benchmark"
    	"github.com/spf13/cobra"
    )
    
    var benchBatchSize uint64
    var nodeCount int
    var iterations int
    
    func init() {
    	benchmarkCmd.Flags().Uint64VarP(&benchBatchSize, "batch", "b", 1,
    		"Batch size to use for node server rounds")
    	benchmarkCmd.Flags().IntVarP(&nodeCount, "numnodes", "n", 1,
    		"Number of nodes for the benchmark")
    	benchmarkCmd.Flags().IntVarP(&iterations, "iterations", "i", 100,
    		"Number of times to iterate the benchmark")
    
      rootCmd.AddCommand(benchmarkCmd)
    }
    
    var benchmarkCmd = &cobra.Command{
      Use:   "benchmark",
      Short: "Server benchmarking tests",
      Long:  `Run internal benchmark funcs by specifying node and batch sizes`,
      Run: func(cmd *cobra.Command, args []string) {
    		benchmark.PrecompIterations(nodeCount, benchBatchSize, iterations)
    		benchmark.RealtimeIterations(nodeCount, benchBatchSize, iterations)
      },
    }