Skip to content

[DE-546] Adding stats fields to the explain API #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 5, 2023

Conversation

apetenchea
Copy link
Member

Purpose
Enhance the AQL explain functionality by adding the following attributes (available since 3.10.4):

  • peakMemoryUsage (number): The maximum memory usage of the query during explain (in bytes)
  • executionTime (number): The (wall-clock) time in seconds needed to explain the query.
    Note that the explain method of AQL queries includes the "stats" field in the returned object. The REST API returns it separately from the "plan" field, but for now we have to merge them together to ensure backward compatibility.

Additionally, the following changes are being made

  • Adding peak_memory_usage as a new property of AQL queries, available since ArangoDB 3.11
  • Adding a CHANGELOG file for keeping track of changes across driver releases

Tests
The necessary tests have been adapted. Note that we have to differentiate now between ArangoDB versions while running the tests.

@apetenchea apetenchea self-assigned this Jun 2, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #251 (52648c7) into main (47a0047) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##             main     #251   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files          26       26           
  Lines        3853     3858    +5     
=======================================
+ Hits         3798     3803    +5     
  Misses         55       55           
Impacted Files Coverage Δ
arango/aql.py 95.00% <100.00%> (+0.10%) ⬆️
arango/client.py 100.00% <100.00%> (ø)
arango/request.py 94.44% <100.00%> (ø)

@CryptoNinjaGeek CryptoNinjaGeek merged commit 0c0adb9 into main Jun 5, 2023
@CryptoNinjaGeek CryptoNinjaGeek deleted the feature/de-546-stats-field-in-explain-api branch June 5, 2023 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants