(parentCmd *cobra.Command)
| 43 | ) |
| 44 | |
| 45 | func initLatencyCmd(parentCmd *cobra.Command) { |
| 46 | addCommonFlags(latencyCmd) |
| 47 | parentCmd.AddCommand(latencyCmd) |
| 48 | latencyCmd.Flags().IntVarP(&latencyLimit, "limit", "L", 1, "The maximum number of nodes to use") |
| 49 | latencyCmd.Flags().BoolVarP(&latencyIpv6, "ipv6", "6", false, "Use IPv6") |
| 50 | } |
| 51 | |
| 52 | func runLatency(c *perfops.Client, target, from string, nodeIDs []int, limit int, ipv6 bool) error { |
| 53 | ctx := context.Background() |