INNER CODE UNIT · Go

config

oneclickvirt/ecs · cmd/ecs-canary/main.go:24

	config := canaryConfig(*offline, *standard, *tcp, *hardware, *deepDiskPath, *deepBurnDuration, *maxDuration)
	preCheck := api.NetCheckResult{Connected: !*offline, StackType: "IPv4", HasIPv4: true}
	ctx := context.Background()
	cancel := func() {}
	if *maxDuration > 0 {
		ctx, cancel = context.WithTimeout(ctx, *maxDuration)
	}
	defer cancel()
	started := time.Now()
	var report *api.StructuredReport
	if canaryRunsHardware(config) {
		report = api.RunAllTestsContext(ctx, preCheck, config).Report
	} else {
		report = api.CollectStructuredReport(ctx, preCheck, config, "", started, started)
	}
	finished := time.Now()
	report.FinishedAt = finished
	report.DurationMS = finished.Sub(started).Milliseconds()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…