(message string)
| 459 | } |
| 460 | |
| 461 | func usageError(message string) error { |
| 462 | usage := fmt.Sprintf("usage:\n %s --source-url <repo> [flags]\n\nflags:\n --scenario bootstrap|sync\n --repeat 3\n --work-dir /tmp/git-sync-bench\n --keep-targets\n --json\n --branch main,release\n --map main:stable\n --tags\n --force-with-lease\n --force-blind\n --prune\n --stats\n --measure-memory\n --max-pack-bytes 104857600\n --target-max-pack-bytes 104857600\n --protocol auto|v1|v2\n -v\n", os.Args[0]) |
| 463 | if message == "" { |
| 464 | return errors.New(strings.TrimSpace(usage)) |
| 465 | } |
| 466 | return fmt.Errorf("%s\n\n%s", message, usage) |
| 467 | } |
| 468 | |
| 469 | type benchProtocolMode gitsync.ProtocolMode |
| 470 |
no outgoing calls
no test coverage detected