github.com/distbuild/reclient@v0.0.0-20240401075343-3de72e395564/internal/pkg/logger/event/event.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 event provides constant names for time metrics.
    16  package event
    17  
    18  // These are duration events that we export time metrics on.
    19  const (
    20  	// LERCVerifyDeps: VerifyDeps time for LERC.
    21  	LERCVerifyDeps = "LERCVerifyDeps"
    22  
    23  	// LERCWriteDeps: WriteDeps time for LERC.
    24  	LERCWriteDeps = "LERCWriteDeps"
    25  
    26  	// LocalCommandExecution: actually running the command locally.
    27  	LocalCommandExecution = "LocalCommandExecution"
    28  
    29  	// LocalCommandQueued: duration the command has been queued for local execution.
    30  	LocalCommandQueued = "LocalCommandQueued"
    31  
    32  	// ProxyExecution: proxy end-to-end time, regardless of execution strategy.
    33  	ProxyExecution = "ProxyExecution"
    34  
    35  	// ProcessInputs: proxy time for IncludeProcessor.ProcessInputs.
    36  	ProcessInputs = "ProcessInputs"
    37  
    38  	// ProcessInputsShallow: proxy time for IncludeProcessor.ProcessInputsShallow.
    39  	ProcessInputsShallow = "ProcessInputsShallow"
    40  
    41  	// CPPInputProcessor measures the time taken for C++ input processor.
    42  	CPPInputProcessor = "CPPInputProcessor"
    43  
    44  	// CPPInputProcessor measures the number of times goma was restarted.
    45  	GomaInputProcessorRestart = "GomaInputProcessorRestart"
    46  
    47  	// InputProcessorWait measures the time spent waiting for local resources to start
    48  	// input processing.
    49  	InputProcessorWait = "InputProcessorWait"
    50  
    51  	// InputProcessorCacheLookup measures the time spent retrieving inputs from deps cache.
    52  	InputProcessorCacheLookup = "InputProcessorCacheLookup"
    53  
    54  	// RacingFinalizationOverhead: time spent finalizing the result of a raced action by
    55  	// cancelling either remote or local, and moving outputs to their correct location in case
    56  	// remote wins.
    57  	RacingFinalizationOverhead = "RacingFinalizationOverhead"
    58  
    59  	// AtomicOutputOverhead: time spent writing outputs atomically.
    60  	AtomicOutputOverhead = "AtomicOutputOverhead"
    61  
    62  	// PostBuildMetricsUpload: time spent post build to upload metrics to Cloud Monitoring.
    63  	PostBuildMetricsUpload = "PostBuildMetricsUpload"
    64  
    65  	// PostBuildMetricsUpload: time spent post build to aggregate rpl file into a stats proto.
    66  	PostBuildAggregateRpl = "PostBuildAggregateRpl"
    67  
    68  	// PostBuildMetricsUpload: time spent post build to load an rpl file from disk.
    69  	PostBuildLoadRpl = "PostBuildLoadRpl"
    70  
    71  	// PostBuildMismatchesIgnore: time spent marking mismatches as ignored based on the input rule.
    72  	PostBuildMismatchesIgnore = "PostBuildMismatchesIgnore"
    73  
    74  	// ProxyUptime is the uptime of the reproxy.
    75  	ProxyUptime = "ProxyUptime"
    76  
    77  	// BootstrapStartup is the time taken to run bootstrap to start reproxy.
    78  	BootstrapStartup = "BootstrapStartup"
    79  
    80  	// BootstrapShutdown is the time taken to run bootstrap to shutdown reproxy.
    81  	BootstrapShutdown = "BootstrapShutdown"
    82  
    83  	// DepsCacheLoad is the load time of the deps cache.
    84  	DepsCacheLoad = "DepsCacheLoad"
    85  
    86  	// DepsCacheWrite is the write time of the deps cache.
    87  	DepsCacheWrite = "DepsCacheWrite"
    88  
    89  	// DepsCacheLoadCount is the number of deps cache entries loaded at reproxy startup.
    90  	DepsCacheLoadCount = "DepsCacheLoadCount"
    91  
    92  	// DepsCacheWriteCount is the number of deps cache entries written at reproxy shutdown.
    93  	DepsCacheWriteCount = "DepsCacheWriteCount"
    94  )