Skip to content

Apache DataFusion SQL Query Engine

doc: Add `Metrics` section to the user-guide (#18216)

Yongting You408e1e4e2c46
diff --git a/docs/source/index.rst b/docs/source/index.rst
index a11ca862e4..6bb3c9485b 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -122,6 +122,7 @@ To get started, see
user-guide/sql/index
user-guide/configs
user-guide/explain-usage
+ user-guide/metrics
user-guide/faq
.. _toc.library-user-guide:
diff --git a/docs/source/user-guide/metrics.md b/docs/source/user-guide/metrics.md
new file mode 100644
index 0000000000..f2634b9015
--- /dev/null
+++ b/docs/source/user-guide/metrics.md
@@ -0,0 +1,37 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Metrics
+
+DataFusion operators expose runtime metrics so you can understand where time is spent and how much data flows through the pipeline. See more in [EXPLAIN ANALYZE](sql/explain.md#explain-analyze).
+
+## Common Metrics
+
+### BaselineMetrics
+
+`BaselineMetrics` are available in most physical operators to capture common measurements.
+
+| Metric | Description |
+| --------------- | ------------------------------------------------------ |
+| elapsed_compute | CPU time the operator actively spends processing work. |
+| output_rows | Total number of rows the operator produces. |
+
+## Operator-specific Metrics
+
+TODO