This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 408e1e4e2c doc: Add `Metrics` section to the user-guide (#18216)
408e1e4e2c is described below

commit 408e1e4e2c46d673a067e05f3e363a6f51e641c4
Author: Yongting You <[email protected]>
AuthorDate: Thu Oct 23 11:07:24 2025 +0800

    doc: Add `Metrics` section to the user-guide (#18216)
    
    ## Which issue does this PR close?
    
    <!--
    We generally require a GitHub issue to be filed for all bug fixes and
    enhancements and this helps us generate change logs for our releases.
    You can link an issue to this PR using the GitHub syntax. For example
    `Closes #123` indicates that this PR will close issue #123.
    -->
    
    - Part of #16602
    
    ## Rationale for this change
    
    <!--
    Why are you proposing this change? If this is already explained clearly
    in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand
    your changes and offer better suggestions for fixes.
    -->
    
    Now we have to search in the code comment (or even implementation) to
    find the documentation of certain metrics, it would be better to open a
    page in the `user-guide` for metrics.
    
    The doc has to be manually updated, the metrics construction is
    scattered in the codebase, so it's hard to make it auto-generated.
    
    This PR only includes 2 common metrics, I plan to add more
    operator-specific metrics while working on
    https://github.com/apache/datafusion/issues/18116
    
    ## What changes are included in this PR?
    
    <!--
    There is no need to duplicate the description in the issue here but it
    is sometimes worth providing a summary of the individual changes in this
    PR.
    -->
    
    ## Are these changes tested?
    
    <!--
    We typically require tests for all PRs in order to:
    1. Prevent the code from being accidentally broken by subsequent changes
    2. Serve as another way to document the expected behavior of the code
    
    If tests are not included in your PR, please explain why (for example,
    are they covered by existing tests)?
    -->
    
    ## Are there any user-facing changes?
    
    <!--
    If there are user-facing changes then we may require documentation to be
    updated before approving the PR.
    -->
    
    <!--
    If there are any breaking changes to public APIs, please add the `api
    change` label.
    -->
---
 docs/source/index.rst             |  1 +
 docs/source/user-guide/metrics.md | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to