9 Commits

Author SHA1 Message Date
Andrew Lamb 5a074ea4c8 Improve datafusion-cli object store profiling summary display (#18085)
## Which issue does this PR close?

- part of https://github.com/apache/datafusion/issues/17207

## Rationale for this change

As suggested by @BlakeOrth in
https://github.com/apache/datafusion/pull/18045#issuecomment-3403692516
here is an attempt to improve the output of datafusion object store
trace profiling:

## What changes are included in this PR?

Update the output format when `\object_store_profiling summary` is set

Current format (on main, before this PR):
```sql
Summaries:
Get
count: 2
duration min: 0.024603s
duration max: 0.031946s
duration avg: 0.028274s
size min: 8 B
size max: 34322 B
size avg: 17165 B
size sum: 34330 B
```


New format (after this PR):

```sql
DataFusion CLI v50.2.0
> \object_store_profiling summary
ObjectStore Profile mode set to Summary
> select count(*) from 'https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_1.parquet';
+----------+
| count(*) |
+----------+
| 1000000  |
+----------+
1 row(s) fetched.
Elapsed 6.754 seconds.

Object Store Profiling
Instrumented Object Store: instrument_mode: Summary, inner: HttpStore
Summaries:
+-----------+----------+-----------+-----------+-----------+-----------+-------+
| Operation | Metric   | min       | max       | avg       | sum       | count |
+-----------+----------+-----------+-----------+-----------+-----------+-------+
| Get       | duration | 0.031645s | 0.047780s | 0.039713s | 0.079425s | 2     |
| Get       | size     | 8 B       | 34322 B   | 17165 B   | 34330 B   | 2     |
+-----------+----------+-----------+-----------+-----------+-----------+-------+
```



## Are these changes tested?
Yes
## Are there any user-facing changes?
Nicer datafusion-cli output
2025-10-17 21:10:13 +00:00
Blake Orth 3bca1bb6eb Adds Trace and Summary to CLI instrumented stores (#18064)
- Adds the ability for a user to choose a summary only output for an
   instrumented object store when using the CLI
 - The existing "enabled" setting that displays both a summary and a
   detailed usage for each object store call has been renamed to `Trace`
   to improve clarity
 - Adds additional test cases for summary only and modifies existing
   tests to use trace
 - Updates user guide docs to reflect the CLI flag and command line
   changes
2025-10-16 10:38:08 +00:00
Blake Orth f210939ecc Adds Object Store Profiling options/commands to CLI (#18004)
* Adds Object Store Profiling options/commands to CLI
 - Adds a CLI option and command to datafusion-cli to enable or disabled
   object store profiling
 - Integrates the command with the instrumented object stores to allow
   the user input to change the mode of the instrumented stores
 - Adds tests to exercise the expected behavior of the commands
 - Adds user docs for the commands/CLI options
 - Updates visibility of `InstrumentedObjectStore` now that it needs to
   be interacted with outside of its module

* Improves InstrumentedObjectStoreRegistry ergonomics
 - Adds better methods to build an InstrumentedObjectStoreRegistry to
   reduce code duplication in common usage
 - Enhances test success criteria
 - Normalizes method names
2025-10-10 21:28:32 +00:00
Nuno Faria 25ad99dc6e feat: Add the ability to review the contents of the Metadata Cache (#17126)
* feat: Add the ability to review the contents of the Metadata Cache

* Remove e_tag from test_metadata_cache

* Add entry in the user doc about this function

* Change type to UInt64

* Fix prettier

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2025-08-12 16:08:31 -04:00
ding-young cb45f1f9cc add top-memory-consumers option in cli (#16081)
add snapshot tests for memory exhaustion
2025-05-22 14:25:36 +08:00
Jyotir Sai 6afd539704 Add disk usage limit configuration to datafusion-cli (#15586)
* added disk limit option

* run prettier and cargo fmt

* help line update
2025-04-06 11:52:50 +08:00
Dawei H. 3f900ac5e1 Test all examples from library-user-guide & user-guide docs (#14544)
* add mut annotation

* fix rust examples

* fix rust examples

* update

* fix first doctest

* fix first doctest

* fix more doctest

* fix more doctest

* fix more doctest

* adopt rustdoc syntax

* adopt rustdoc syntax

* adopt rustdoc syntax

* fix more doctest

* add missing imports

* final udtf

* reenable

* remove dep

* run prettier

* api-health

* update doc

* update doc

* temp fix

* fix doc

* fix async schema provider

* fix async schema provider

* fix doc

* fix doc

* reorder

* refactor

* s

* finish

* minor update

* add missing docs

* add deps (#3)

* fix doctest

* update doc

* fix doctest

* fix doctest

* tweak showkeys

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* update to use user_doc

* add rustdoc preprocessing

* fix dir

* revert to original doc

* add allocator

* mark type

* update

* fix doctest

* add doctest

* add doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* prettier format

* revert change to datafusion-testing

* add apache header

* install cmake in setup-builder for ci workflow dependency

* taplo + fix snmalloc

* Update function docs

* preprocess user-guide

* Render examples as sql

* fix intro

* fix docs via script

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2025-02-10 10:29:44 -05:00
Trent Hauck d4228feca3 refactor: remove extra default in max rows (#10941) 2024-06-17 09:54:11 +08:00
Andrew Lamb 0573f78c7e Update datafusion-cli docs, split up (#10078)
* Update datafusion-cli docs, split up

* remove PiPI instructions
2024-04-16 07:58:16 -06:00