Bug 40813 - Add ability to embed page start and end timing
Summary: Add ability to embed page start and end timing
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-15 19:19 UTC by Kyle M Hall (khall)
Modified: 2025-09-16 16:55 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40813: Add ability to embed page start and end timing (2.52 KB, patch)
2025-09-15 19:21 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 40813: Add ability to embed page start and end timing (6.28 KB, patch)
2025-09-16 16:51 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2025-09-15 19:19:55 UTC
It would be useful to know what time a page load was initiated and rendering completed for debugging purposes. The most reasonable solution I've found is to get a time from the start of get_template_and_user and the end of intranet-bottom.inc.
Comment 1 Kyle M Hall (khall) 2025-09-15 19:21:59 UTC
Created attachment 186445 [details] [review]
Bug 40813: Add ability to embed page start and end timing

It would be useful to know what time a page load was initiated and
rendering completed for debugging purposes. The most reasonable solution
I've found is to get a time from the start of get_template_and_user and
the end of intranet-bottom.inc. This adds timing to nearly all Koha
pages with just a few lines of code.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Load mainpage.pl
4) Note the "start" and "end" values at the bottom of the page
Comment 2 Kyle M Hall (khall) 2025-09-15 19:24:25 UTC
Open questions:
1) Do we need to hide this data by default using CSS or a syspref? If so, which?

2) Can anyone style this information better?
Comment 3 Lucas Gass (lukeg) 2025-09-16 14:40:45 UTC
(In reply to Kyle M Hall (khall) from comment #2)
> Open questions:
> 1) Do we need to hide this data by default using CSS or a syspref? If so,
> which?

In my opinion it should be by system preference. Perhaps "DumpTemplateLoadTimes"?
Comment 4 Lucas Gass (lukeg) 2025-09-16 16:51:41 UTC
Created attachment 186490 [details] [review]
Bug 40813: Add ability to embed page start and end timing

It would be useful to know what time a page load was initiated and
rendering completed for debugging purposes. The most reasonable solution
I've found is to get a time from the start of get_template_and_user and
the end of intranet-bottom.inc. This adds timing to nearly all Koha
pages with just a few lines of code.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Load mainpage.pl
4) Note the "start" and "end" values at the bottom of the page