code: func ScheduleProfileLoop(s3BucketArchive interface{},
  	snapshotInterval time.Duration,
  	cpuProfileDuration time.Duration,
  	profileTypes ...string) {
  
  	time.AfterFunc(snapshotInterval, func() {
  		snapshotProfiles(s3BucketArchive, snapshotInterval, cpuProfileDuration, profileTypes...)
  	})
  }
docs: // ScheduleProfileLoop installs a profiling loop that pushes profile information
  // to S3 for local consumption using a `profile` command that wraps
  // pprof