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

[D1] add rows read/written to wrangler d1 info output #4621

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

rozenmd
Copy link
Contributor

@rozenmd rozenmd commented Dec 18, 2023

This PR adds rowsRead and rowsWritten to wrangler d1 info <NAME> output:

 npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7249340037/npm-package-wrangler-4621 d1 info northwind
✔ Select an account › D1
┌───────────────────┬──────────────────────────────────────┐
│                   │ d5b1d127-xxxx-xxxx-xxxx-cbc69f0a9e06 │
├───────────────────┼──────────────────────────────────────┤
│ name              │ northwind                            │
├───────────────────┼──────────────────────────────────────┤
│ created_at        │ 2023-05-23T08:33:54.590Z             │
├───────────────────┼──────────────────────────────────────┤
│ version           │ beta                                 │
├───────────────────┼──────────────────────────────────────┤
│ num_tables        │ 13                                   │
├───────────────────┼──────────────────────────────────────┤
│ running_in_region │ WEUR                                 │
├───────────────────┼──────────────────────────────────────┤
│ database_size     │ 33.1 MB                              │
├───────────────────┼──────────────────────────────────────┤
│ readQueries24h    │ 2,035                                │
├───────────────────┼──────────────────────────────────────┤
│ writeQueries24h   │ 0                                    │
├───────────────────┼──────────────────────────────────────┤
│ rowsRead24h       │ 609,744,286                          │
├───────────────────┼──────────────────────────────────────┤
│ rowsWritten24h    │ 0                                    │
└───────────────────┴──────────────────────────────────────┘

@rozenmd rozenmd requested review from a team as code owners December 18, 2023 14:18
Copy link

changeset-bot bot commented Dec 18, 2023

🦋 Changeset detected

Latest commit: fa52541

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

Copy link
Contributor

github-actions bot commented Dec 18, 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/7249631762/npm-package-wrangler-4621

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

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

Or you can use npx with this latest build directly:

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

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20231030.4
workerd 1.20231030.0 1.20231030.0
workerd --version 1.20231030.0 2023-10-30

|

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@rozenmd rozenmd requested a review from elithrar December 18, 2023 14:31
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.

Great idea!

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Merging #4621 (fa52541) into main (e2205e3) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4621      +/-   ##
==========================================
- Coverage   75.46%   75.44%   -0.02%     
==========================================
  Files         242      242              
  Lines       12957    12965       +8     
  Branches     3331     3337       +6     
==========================================
+ Hits         9778     9782       +4     
- Misses       3179     3183       +4     
Files Coverage Δ
packages/wrangler/src/d1/info.tsx 18.51% <0.00%> (-3.23%) ⬇️

... and 6 files with indirect coverage changes

@rozenmd rozenmd merged commit 98dee93 into main Dec 18, 2023
17 checks passed
@rozenmd rozenmd deleted the rozenmd/update-info branch December 18, 2023 15:47
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.

2 participants