github.com/distbuild/reclient@v0.0.0-20240401075343-3de72e395564/experiments/cmd/tabulator/main.go (about) 1 // Copyright 2023 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Package main is the main package for the experiment tabulator binary. 16 // 17 // This binary stores an experiment's results into a BigQuery table for 18 // easy querying. 19 // 20 // Example: 21 // bazelisk run //experiments/cmd/tabulator:tabulator -- --experiment_name=BouncyRacing-20201005-1940 22 package main 23 24 import ( 25 "flag" 26 27 "github.com/bazelbuild/reclient/experiments/internal/pkg/tabulator" 28 29 log "github.com/golang/glog" 30 ) 31 32 const ( 33 dataset = "results" 34 table = "results" 35 ) 36 37 var ( 38 gcpProject = flag.String("gcp_project", "foundry-x-experiments", "Name of the GCP project to store bigquery data in") 39 resBucket = flag.String("results_bucket", "foundry-x-experiments-results", "Name of the GCS bucket containing experiment results") 40 expName = flag.String("experiment_name", "", "Name of the experiment folder in the results bucket") 41 ) 42 43 func main() { 44 flag.Parse() 45 if err := tabulator.RunExperimentResultCollector(*resBucket, *expName, *gcpProject); err != nil { 46 log.Fatalf("Error running tabulator: %v", err) 47 } 48 }