func Run(cfg *config.Config) ([]TestResult, error) {
	client, err := reggie.NewClient(
		cfg.Registry.RootURL,
		reggie.WithUserAgent("distribution-bench"),
		reggie.WithUsernamePassword(cfg.Registry.Username, cfg.Registry.Password),
		reggie.WithDefaultName(cfg.Registry.Namespace),
		reggie.WithDebug(cfg.Debug),
	)
	if err != nil {
		return nil, errors.Wrap(err, "creating registry client")
	}

	results := make([]TestResult, len(cfg.Tests))
	for i, test := range cfg.Tests {
		result, err := runTest(client, test)
		if err != nil {
			return nil, errors.Wrap(err, "running test")
		}
		results[i] = result
	}

	return results, nil
}
// Run runs a benchmark based on the given config.
Run runs a benchmark based on the given config.
// Run runs a benchmark based on the given config .
func Run(cfg *config.Config) ([]TestResult, error) {
	client, err := reggie.NewClient(
		cfg.Registry.RootURL,
		reggie.WithUserAgent("distribution-bench"),
		reggie.WithUsernamePassword(cfg.Registry.Username, cfg.Registry.Password),
		reggie.WithDefaultName(cfg.Registry.Namespace),
		reggie.WithDebug(cfg.Debug),
	)
	if err != nil {
		return nil, errors.Wrap(err, "creating registry client")
	}
	results := make([]TestResult, len(cfg.Tests))
	for i, test := range cfg.Tests {
		result, err := runTest(client, test)
		if err != nil {
			return nil, errors.Wrap(err, "running test")
		}
		results[i] = result
	}
	return results, nil
}
func Run ( cfg * config . Config ) ( [ ] TestResult , error ) { client , err := reggie . NewClient ( cfg . Registry . RootURL , reggie . WithUserAgent ( " " ) , reggie . WithUsernamePassword ( cfg . Registry . Username , cfg . Registry . Password ) , reggie . WithDefaultName ( cfg . Registry . Namespace ) , reggie . WithDebug ( cfg . Debug ) , ) if err != nil { return nil , errors . Wrap ( err , " " ) } results := make ( [ ] TestResult , len ( cfg . Tests ) ) for i , test := range cfg . Tests { result , err := runTest ( client , test ) if err != nil { return nil , errors . Wrap ( err , " " ) } results [ i ] = result } return results , nil }
Run runs a benchmark based on the given config.
Run runs a benchmark based on the given config .