cmd

package
v0.0.0-...-73c8340 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTTPSeqCmd = &cobra.Command{
	Use:   "http",
	Short: "HTTP Sequence Load Test",
	Long:  "Run the HTTP/1.1 sequence load test",
	Run: func(cmd *cobra.Command, args []string) {
		addr, _ := cmd.Flags().GetString("addr")
		startSequence, _ := cmd.Flags().GetInt("start_sequence")
		numMessages, _ := cmd.Flags().GetInt("num_messages")
		numConns, _ := cmd.Flags().GetInt("num_conns")
		reqSize, _ := cmd.Flags().GetInt("req_size")
		respSize, _ := cmd.Flags().GetInt("resp_size")
		targetRPS, _ := cmd.Flags().GetInt("target_rps")
		log.
			WithField("addr", addr).
			WithField("start_sequence", startSequence).
			WithField("num_messages", numMessages).
			WithField("num_conns", numConns).
			WithField("req_size", reqSize).
			WithField("resp_size", respSize).
			WithField("target_rps", targetRPS).
			Info("Running HTTP sequence tests")

		c := httpclient.New(addr, startSequence, numMessages, numConns, reqSize, respSize, targetRPS)
		_ = c.Run()
		_ = c.PrintStats()
	},
}

HTTPSeqCmd is the generates HTTP sequence messages.

View Source
var RootCmd = &cobra.Command{
	Use:   "ltc",
	Short: "Load Test Client",
	Long:  "This is the load test client to test Pixie under various conditions",
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		log.WithField("time", time.Now()).
			Info("Starting Load Test Client")
		if skip, _ := cmd.Flags().GetBool("skip_verify"); skip {
			http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
		}
	},
}

RootCmd is the base command for this CLI.

View Source
var SeqCmd = &cobra.Command{
	Use:   "seq",
	Short: "Run sequence related tests",
}

SeqCmd is the base of all sequence tests.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL