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

Record server startup time in ProfileEvents  #45250

Merged
merged 3 commits into from Jan 16, 2023

Conversation

SmitaRKulkarni
Copy link
Member

@SmitaRKulkarni SmitaRKulkarni commented Jan 13, 2023

Changelog category (leave one):

  • Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Record server startup time in ProfileEvents resolves #43188
Implementation:

  • Added ProfileEvents::ServerStartupMilliseconds.
  • Recorded time from start of main till listening to sockets.
    Testing:
  • Added a test 02532_profileevents_server_startup_time.sql

Implementation:
* Added ProfileEvents::ServerStartupTime.
* Recorded time from start of main till listening to sockets.
Testing:
* Added a test 02532_profileevents_server_startup_time.sql
programs/server/Server.cpp Outdated Show resolved Hide resolved
src/Common/ProfileEvents.cpp Outdated Show resolved Hide resolved
programs/server/Server.cpp Outdated Show resolved Hide resolved
…ds - Record server startup time in ProfileEvents
programs/server/Server.cpp Outdated Show resolved Hide resolved
programs/server/Server.cpp Outdated Show resolved Hide resolved
@qoega
Copy link
Member

qoega commented Jan 13, 2023

Do you know if internal port is up before we accept external http/native connections? I had an integration test(#45156) where it was important to check it is up.
Don't you think it will be useful to add Events per interface as a follow up?

@alexey-milovidov
Copy link
Member

It's ok to have a single event for the time when all the listeners are up.

@qoega
Copy link
Member

qoega commented Jan 14, 2023

Still, do we guarantee that all listeners are up when we write those? What is the order of endpoint initialization? How can you check that all are ready - just OK on http or native will not work and query event is inadequate.

@alexey-milovidov
Copy link
Member

alexey-milovidov commented Jan 15, 2023

They are initialized in a sequence and are ready at similar times (except the embedded Keeper, but it does not matter). It's ok if the metric overestimates the startup time a little. Therefore, let's record the time after starting the last of the listeners.

…nd added stopping the StopWatch - Record server startup time in ProfileEvents
@kssenii kssenii merged commit d859976 into master Jan 16, 2023
@kssenii kssenii deleted the 43188_Record_startup_time_in_profileevents branch January 16, 2023 11:20
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.

None yet

4 participants