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

feat: server.timing for Server-Timing #4800

Merged
merged 6 commits into from
Jan 19, 2019
Merged

feat: server.timing for Server-Timing #4800

merged 6 commits into from
Jan 19, 2019

Conversation

clarkdo
Copy link
Member

@clarkdo clarkdo commented Jan 18, 2019

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@clarkdo clarkdo requested review from pi0 and atinux January 18, 2019 14:03
@codecov-io
Copy link

codecov-io commented Jan 18, 2019

Codecov Report

Merging #4800 into dev will decrease coverage by 0.04%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #4800      +/-   ##
==========================================
- Coverage   91.78%   91.74%   -0.05%     
==========================================
  Files          67       68       +1     
  Lines        2289     2325      +36     
  Branches      569      578       +9     
==========================================
+ Hits         2101     2133      +32     
- Misses        170      174       +4     
  Partials       18       18
Impacted Files Coverage Δ
packages/config/src/config/server.js 100% <ø> (ø) ⬆️
packages/server/src/server.js 94.31% <100%> (+0.13%) ⬆️
packages/server/src/middleware/timing.js 84.21% <84.21%> (ø)
packages/utils/src/timer.js 96.42% <93.33%> (-3.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b3e7be...18adfd6. Read the comment docs.

@clarkdo clarkdo changed the title Server timing feat: server.timing for Server-Timing Jan 18, 2019
pi0
pi0 previously approved these changes Jan 19, 2019
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Cool! @clarkdo 👍

@pi0
Copy link
Member

pi0 commented Jan 19, 2019

Mini docs:

Enabled server.timing option (disabled by default) adds a middleware to measure SSR generate time and add it to headers ('Server-Timing')

server.timing can be also an object for providing options. Currently only supported one is total. (I don't know exact use case)

@pi0 pi0 merged commit b23f5c9 into nuxt:dev Jan 19, 2019
@clarkdo
Copy link
Member Author

clarkdo commented Jan 21, 2019

Doc pr: nuxt/docs#1115

@clarkdo clarkdo deleted the server-timing branch April 2, 2019 13:14
@fatlinesofcode
Copy link

@clarkdo this works great for when i used nuxt dev but i cant see the timing when i used production e.g. nuxt build && nuxt start

If there something else we have to do get the timings in production mode?

@clarkdo
Copy link
Member Author

clarkdo commented Sep 4, 2019

@fatlinesofcode Hi, can you provide a reproducible repo?

@fatlinesofcode
Copy link

hi @clarkdo thanks for the reply.

I forked the hello world repo and im able to replicate the issue
https://codesandbox.io/s/example-hello-world-3q0d6

When running a lighthouse audit i can see the timing measure in the report using dev but not in production.

Screen Shot 2019-09-04 at 5 16 09 pm

@fatlinesofcode
Copy link

example in dev mode
https://codesandbox.io/s/example-hello-world-7z1fk

Screen Shot 2019-09-04 at 5 21 02 pm

@clarkdo clarkdo self-assigned this Sep 4, 2019
@clarkdo
Copy link
Member Author

clarkdo commented Sep 4, 2019

Thanks, I’ll look into it within this week🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants