perf

package
v0.5.69 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrMesheryConfigCode       = "1027"
	ErrReadFilepathCode        = "1028"
	ErrNoProfileNameCode       = "1029"
	ErrNoTestURLCode           = "1030"
	ErrNotValidURLCode         = "1031"
	ErrFailMarshalCode         = "1032"
	ErrAttachAuthTokenCode     = "1033"
	ErrFailRequestCode         = "1034"
	ErrFailReqStatusCode       = "1035"
	ErrFailUnmarshalCode       = "1036"
	ErrNoProfileFoundCode      = "1037"
	ErrFailTestRunCode         = "1038"
	ErrInvalidOutputChoiceCode = "1039"
	ErrUnauthenticatedCode     = "1040"
)

Variables

View Source
var PerfCmd = &cobra.Command{
	Use:   "perf",
	Short: "Performance Management",
	Long:  `Performance Management & Benchmarking`,
	Example: `
// Run performance test
mesheryctl perf apply --profile test --name \"a quick stress test\" --url http://192.168.1.15/productpage --qps 300 --concurrent-requests 2 --duration 30s --token \"provider=Meshery\"
	
// List performance profiles
mesheryctl perf profile

// List performance results
mesheryctl perf result
	`,
	Args: cobra.MinimumNArgs(1),
	PreRunE: func(cmd *cobra.Command, args []string) error {

		hcOptions := &system.HealthCheckOptions{
			IsPreRunE:  true,
			PrintLogs:  false,
			Subcommand: cmd.Use,
		}
		hc, err := system.NewHealthChecker(hcOptions)
		if err != nil {
			return errors.Wrapf(err, "failed to initialize healthchecker")
		}
		return hc.RunPreflightHealthChecks()
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		if ok := utils.IsValidSubcommand(availableSubcommands, args[0]); !ok {
			return errors.New(utils.SystemError(fmt.Sprintf("invalid command: \"%s\"", args[0])))
		}
		return nil
	},
}

PerfCmd represents the Performance Management CLI command

Functions

func ErrAttachAuthToken added in v0.5.68

func ErrAttachAuthToken(err error) error

func ErrFailMarshal added in v0.5.68

func ErrFailMarshal(err error) error

func ErrFailReqStatus added in v0.5.68

func ErrFailReqStatus(statusCode int) error

func ErrFailRequest added in v0.5.68

func ErrFailRequest(err error) error

func ErrFailTestRun added in v0.5.68

func ErrFailTestRun() error

func ErrFailUnmarshal added in v0.5.68

func ErrFailUnmarshal(err error) error

func ErrInvalidOutputChoice added in v0.5.68

func ErrInvalidOutputChoice() error

func ErrMesheryConfig added in v0.5.68

func ErrMesheryConfig(err error) error

func ErrNoProfileFound added in v0.5.68

func ErrNoProfileFound() error

func ErrNoProfileName added in v0.5.68

func ErrNoProfileName() error

func ErrNoTestURL added in v0.5.68

func ErrNoTestURL() error

func ErrNotValidURL added in v0.5.68

func ErrNotValidURL() error

func ErrReadFilepath added in v0.5.68

func ErrReadFilepath(err error) error

func ErrUnauthenticated added in v0.5.68

func ErrUnauthenticated() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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