profiler: busybench should allow specifying the project ID by flag
@@ -32,6 +32,7 @@ var (
mutexProfiling = flag.Bool("mutex_profiling", false, "enable mutex profiling")
duration = flag.Int("duration", 600, "duration of the benchmark in seconds")
apiAddr = flag.String("api_address", "", "API address of the profiler (e.g. 'cloudprofiler.googleapis.com:443')")
+ projectID = flag.String("project_id", "", "cloud project ID")
)
// busywork continuously generates 1MiB of random data and compresses it
@@ -82,7 +83,8 @@ func main() {
if err := profiler.Start(profiler.Config{Service: *service,
MutexProfiling: *mutexProfiling,
DebugLogging: true,
- APIAddr: *apiAddr}); err != nil {
+ APIAddr: *apiAddr,
+ ProjectID: *projectID}); err != nil {
log.Printf("Failed to start the profiler: %v", err)
return
}
