Skip to content
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

fix: add 24h read/write metrics to d1 info #3434

Merged
merged 9 commits into from
Jun 13, 2023
Merged

fix: add 24h read/write metrics to d1 info #3434

merged 9 commits into from
Jun 13, 2023

Conversation

rozenmd
Copy link
Contributor

@rozenmd rozenmd commented Jun 12, 2023

output for experimental dbs:

┌───────────────────┬──────────────────────────────────────┐
│                   │ xxxx-xxxx-xxxx-xxxx-xxxx             │
├───────────────────┼──────────────────────────────────────┤
│ name              │ northwind                            │
├───────────────────┼──────────────────────────────────────┤
│ version           │ beta                                 │
├───────────────────┼──────────────────────────────────────┤
│ num_tables        │ 13                                   │
├───────────────────┼──────────────────────────────────────┤
│ file_size         │ 33.1 MB                              │
├───────────────────┼──────────────────────────────────────┤
│ running_in_region │ WEUR                                 │
├───────────────────┼──────────────────────────────────────┤
│ read_queries_24h  │ 2219                                 │
├───────────────────┼──────────────────────────────────────┤
│ write_queries_24h │ 0                                    │
└───────────────────┴──────────────────────────────────────┘
{
  "uuid": "xxxx-xxxx-xxxx-xxxx-xxxx",
  "name": "northwind",
  "version": "beta",
  "num_tables": 13,
  "file_size": 33067008,
  "running_in_region": "WEUR",
  "read_queries_24h": 2219,
  "write_queries_24h": 0
}

@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2023

🦋 Changeset detected

Latest commit: 9bd778f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2023

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5255000265/npm-package-wrangler-3434

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3434/npm-package-wrangler-3434

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5255000265/npm-package-wrangler-3434 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5255000265/npm-package-cloudflare-pages-shared-3434

Note that these links will no longer work once the GitHub Actions artifact expires.

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #3434 (9bd778f) into main (0edbba7) will decrease coverage by 0.11%.
The diff coverage is 19.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3434      +/-   ##
==========================================
- Coverage   75.32%   75.21%   -0.11%     
==========================================
  Files         183      183              
  Lines       11022    11052      +30     
  Branches     2893     2904      +11     
==========================================
+ Hits         8302     8313      +11     
- Misses       2720     2739      +19     
Impacted Files Coverage Δ
packages/wrangler/src/d1/info.tsx 21.73% <3.57%> (-19.93%) ⬇️
packages/wrangler/src/cfetch/index.ts 90.54% <75.00%> (-1.89%) ⬇️

... and 3 files with indirect coverage changes

@rozenmd rozenmd requested review from a team and elithrar June 12, 2023 15:18
Copy link
Contributor

@elithrar elithrar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rozenmd - should we change file_size to something clearer - e.g. database_size - ?

Since file_size implies a single file/isn't a term we use elsewhere when talking about D1.

Otherwise: LGTM!

@rozenmd rozenmd requested a review from elithrar June 12, 2023 17:31
packages/wrangler/src/d1/info.tsx Outdated Show resolved Hide resolved
packages/wrangler/src/d1/info.tsx Outdated Show resolved Hide resolved
packages/wrangler/package.json Outdated Show resolved Hide resolved
@rozenmd rozenmd merged commit 4beac41 into main Jun 13, 2023
@rozenmd rozenmd deleted the rozenmd/d1-info branch June 13, 2023 12:45
@github-actions github-actions bot mentioned this pull request Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants