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

Add duration of individual migration; up and down #410

Merged
merged 1 commit into from
Oct 21, 2022
Merged

Conversation

mfridman
Copy link
Collaborator

@mfridman mfridman commented Oct 20, 2022

This PR adds duration output to each individual up and down migration, e.g.,

Note, the duration is truncated down to 2. I found the default precision overly long.

2022/10/20 17:21:28 OK   00001_a.sql (44.74ms)
2022/10/20 17:21:28 OK   00002_b.sql (7.52ms)
2022/10/20 17:21:28 OK   00003_c.sql (35.31ms)
2022/10/20 17:21:28 OK   00004_d.sql (4.17ms)
2022/10/20 17:21:28 OK   00005_e.sql (37.76ms)
2022/10/20 17:21:28 OK   00006_f.sql (9ms)
2022/10/20 17:21:28 OK   00007_g.sql (37.31ms)    <- microseconds
2022/10/20 17:21:40 OK   00008_h.sql (12.04s)     <- seconds
2022/10/20 17:22:42 OK   00009_i.sql (1m2.04s)    <- minutes
2022/10/20 17:22:42 OK   00010_j.sql (36.66ms)
2022/10/20 17:22:42 OK   00011_k.sql (79.72ms)

cc @VojtechVitek let me know if the output is good enough.

Fix #388

Copy link
Collaborator

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

I like this. Looks very readable :)

LGTM

@mfridman mfridman merged commit 28113a2 into master Oct 21, 2022
@mfridman mfridman deleted the gh-388-duration branch October 21, 2022 13:25
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.

Print out duration of execution time of each migration
2 participants