| // Copyright 2013 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| func RunUnderProfiler(args ...string) (string, string) { |
| // Size runs size command on the file. Returns filename with output. Any errors are ignored. |
| func Size(file string) string { |
| resf, err := os.Create(tempFilename("size.txt")) |
| log.Printf("Failed to create output file: %v", err) |
| cmd := exec.Command("size", "-m", file) |
| if err := cmd.Run(); err != nil { |
| log.Printf("Failed to execute 'size -m %v': %v\n%v", file, err, stderr.String()) |
| func getVMPeak() uint64 { |
| func setProcessAffinity(v int) { |