github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/sqltelemetry/exec.go (about) 1 // Copyright 2019 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 package sqltelemetry 12 13 import ( 14 "fmt" 15 16 "github.com/cockroachdb/cockroach/pkg/server/telemetry" 17 ) 18 19 // DistSQLExecCounter is to be incremented whenever a query is distributed 20 // across multiple nodes. 21 var DistSQLExecCounter = telemetry.GetCounterOnce("sql.exec.query.is-distributed") 22 23 // VecExecCounter is to be incremented whenever a query runs with the vectorized 24 // execution engine. 25 var VecExecCounter = telemetry.GetCounterOnce("sql.exec.query.is-vectorized") 26 27 // VecModeCounter is to be incremented every time the vectorized execution mode 28 // is changed (including turned off). 29 func VecModeCounter(mode string) telemetry.Counter { 30 return telemetry.GetCounter(fmt.Sprintf("sql.exec.vectorized-setting.%s", mode)) 31 } 32 33 // CascadesLimitReached is to be incremented whenever the limit of foreign key 34 // cascade for a single query is exceeded. 35 var CascadesLimitReached = telemetry.GetCounterOnce("sql.exec.cascade-limit-reached")