[Bug 40813] New: Add ability to embed page start and end timing
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Bug ID: 40813 Summary: Add ability to embed page start and end timing Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #1 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 186445 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186445&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #2 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- 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? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (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"? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186445|0 |1 is obsolete| | --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 186490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186490&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186445|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186490|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 1) QA checks - failing (blocker) I am not sure about the span error. I have tried to spot it, but failed. But will be interesting to check maybe. Processing files [RUNNING] C4/Auth.pm [RUNNING] koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc [ ] 0/2 tests completed [error] E3jaz8Qpz5.tt: SyntaxError: Unexpected closing tag "span". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-e... (4:9) [error] 2 | #~136~# [error] 3 | #~137~# [error] > 4 | </span> [error] | ^^^^^^^ [error] 5 | </div> [error] 6 | </footer> [FAIL] koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc [PASS] C4/Auth.pm Result: [PASS] C4/Auth.pm [FAIL] koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc FAIL filters missing_filter at line 301 ( <span class="navbar-text start_time" data-start="[% start_time %]">) missing_filter at line 303 ( [% start_time.hms(':') %]) missing_filter at line 306 ( <span class="navbar-text end_time" data-end="[% end_time %]">) missing_filter at line 308 ( [% end_time.hms(':') %]) FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc` Processing additional checks PASS! 2) Code review Nothing spotted. 3) Testing a) System preference / Debug setting (blocker) It works as described, but I agree with Lucas' comment about the preference. This should be optional and have a switch to turn on/off b) Styling (no blocker) Right now it doesn't stay at the bottom of the page but moves up on pages with not a lot of content. For testing it might be nicer to "pin" it to the bottom, so you can compare a little easier between pages, etc. because it's always in the same spot. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 192095 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192095&action=edit Mockup of the times in the footer Maybe it could be shown in a footer like the language selectors? We'd have to re-do the logic on when to show it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Owen Leonard from comment #6)
Created attachment 192095 [details] Mockup of the times in the footer
Maybe it could be shown in a footer like the language selectors? We'd have to re-do the logic on when to show it.
That looks really great to me. How would it look like if there are no other languages active? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #8 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192117 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192117&action=edit Bug 40813: Move timings to existing footer -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #9 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Own, I think I've got the logic fixed, but I have failed to style it correctly. Can you have a look? Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #10 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 192128 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192128&action=edit Bug 40813: (follow-up) Add some CSS, udpate navbar structure This follow-up changes the structure of the footer navbar markup so that it avoids IDs related to "language" since its purpose is now more general. The start and end time markup is adjusted for being inside a navbar and to align it to the right away from the language menu (if present). Also changed: Added missing html filters and fixed a minor tidy complaint in Auth.pm. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #11 from Owen Leonard <oleonard@myacpl.org> --- It occurs to me that this would be even more useful if it output milliseconds too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186445|0 |1 is obsolete| | --- Comment #12 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192167 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192167&action=edit 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 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192117|0 |1 is obsolete| | --- Comment #13 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192168&action=edit Bug 40813: Move timings to existing footer Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192128|0 |1 is obsolete| | --- Comment #14 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192169&action=edit Bug 40813: (follow-up) Add some CSS, udpate navbar structure This follow-up changes the structure of the footer navbar markup so that it avoids IDs related to "language" since its purpose is now more general. The start and end time markup is adjusted for being inside a navbar and to align it to the right away from the language menu (if present). Also changed: Added missing html filters and fixed a minor tidy complaint in Auth.pm. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #15 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 192170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192170&action=edit Bug 40813: (follow-up) Add milliseconds Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Patch doesn't apply --- Comment #16 from David Nind <david@davidnind.com> --- The patches no longer apply 8-(... git bz apply 40813 📋 Bug 40813 - Add ability to embed page start and end timing • 192167 - Bug 40813: Add ability to embed page start and end timing • 192168 - Bug 40813: Move timings to existing footer • 192169 - Bug 40813: (follow-up) Add some CSS, udpate navbar structure • 192170 - Bug 40813: (follow-up) Add milliseconds Apply? [(y)es, (n)o, (i)nteractive] y Preparing 4 patch(es): ✓ Prepared 4 patch(es) Applying 4 patch(es): ✓ [1/4] Applied Bug 40813: Add ability to embed page start and end timing ✓ [2/4] Applied Bug 40813: Move timings to existing footer Patch application failed for attachment 192169 - Bug 40813: (follow-up) Add some CSS, udpate navbar structure -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #17 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Katrin Fischer from comment #5)
It works as described, but I agree with Lucas' comment about the preference. This should be optional and have a switch to turn on/off
Agreed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Chris Mathevet <chris.mathevet@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris.mathevet@inLibro.com Status|Needs Signoff |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #18 from Owen Leonard <oleonard@myacpl.org> --- I don't know why this keeps getting set to "Patch doesn't apply." It applies fine for me! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #19 from Chris Mathevet <chris.mathevet@inLibro.com> --- (In reply to Owen Leonard from comment #18)
I don't know why this keeps getting set to "Patch doesn't apply." It applies fine for me!
The error I get : sha1 missing or unusable 📋 Bug 40813 - Add ability to embed page start and end timing • 192167 - Bug 40813: Add ability to embed page start and end timing • 192168 - Bug 40813: Move timings to existing footer • 192169 - Bug 40813: (follow-up) Add some CSS, udpate navbar structure • 192170 - Bug 40813: (follow-up) Add milliseconds Apply? [(y)es, (n)o, (i)nteractive] y Preparing 4 patch(es): ✓ Prepared 4 patch(es) Applying 4 patch(es): ✓ [1/4] Applied Bug 40813: Add ability to embed page start and end timing ✓ [2/4] Applied Bug 40813: Move timings to existing footer Patch application failed for attachment 192169 - Bug 40813: (follow-up) Add some CSS, udpate navbar structure Patches left in /tmp/s29YgYccEu for manual application if needed To resolve: 1. Fix conflicts (use 'git mergetool' or edit files manually) 2. Stage resolved files with 'git add' 3. Continue with 'git bz apply --continue' or 'git am --continue' 4. Or skip this patch with 'git bz apply --skip' 5. Or abort with 'git bz apply --abort' Error: Apply failed: Git command (git am -3 /tmp/s29YgYccEu/0003-192169.patch) failed: erreur : l'information de sha1 est manquante ou inutilisable (C4/Auth.pm). erreur : could not build fake ancestor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #20 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Chris Mathevet from comment #19)
The error I get : sha1 missing or unusable
First it was fine, then I got the sha1 missing error, then it worked again. I don't understand it! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #21 from David Nind <david@davidnind.com> --- I'm also getting the sha1/fake ancestor error. Someone tried to explain this to me once, but I still have no idea what it means! ... Patch application failed for attachment 192169 - Bug 40813: (follow-up) Add some CSS, udpate navbar structure ... Error: Apply failed: Git command (git am -3 /tmp/Z4NWEqUarD/0003-192169.patch) failed: error: sha1 information is lacking or useless (C4/Auth.pm). error: could not build fake ancestor hint: Use 'git am --show-current-patch=diff' to see the failed patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Someone once told me it has to do with your own repo and the information it has. So it might apply for the original patch author, but not for someone else testing. Maybe making sure you have a full and current copy of the repo could help? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #23 from David Cook <dcook@prosentient.com.au> --- (In reply to Owen Leonard from comment #20)
(In reply to Chris Mathevet from comment #19)
The error I get : sha1 missing or unusable
First it was fine, then I got the sha1 missing error, then it worked again. I don't understand it!
If you look at the "Details" for "Bug 40813: (follow-up) Add some CSS, udpate navbar structure" you'll see these two lines: diff --git a/C4/Auth.pm b/C4/Auth.pm index 615ee53525a..8414922ef0f 100644 The hash on the left is the state you're moving FROM and the hash on the right is the state you're moving TO. So let's fetch upstream and rebase to make sure we're all up-to-date kohadev-koha@kohadevbox:koha(main)$ git fetch origin kohadev-koha@kohadevbox:koha(main)$ git rebase origin/main Current branch main is up to date. Now I check on that left most state: kohadev-koha@kohadevbox:koha(main)$ git show 615ee53525a fatal: ambiguous argument '615ee53525a': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Uh oh! Fatal error! That means that commit hash does not exist in the upstream git repo "origin". @Owen: that means that the branch that contains your patch is using an ancestor that exists in your local repo but not the upstream repo. This could be due to a few things. It might be that someone has done an interactive rebase on the upstream "origin" which has resulted in new commit hashes. Or it could be that your branch has other commits before your patch which don't exist upstream. In any case, it's easy to fix. Do a "git fetch origin", rebase against "origin/main", and ensure repost the patches - including Kyle's patches, since your commit hash for Kyle's patches could be different to the ones posted here. I think the typical cause of the problem is probably that people apply the patches from another author, possibly do an interactive rebase or a git cherry-pick which yields different commit hashes, and then build their patch off that ancestor, but then only upload their patch with the change - not realising that they're based off a local-only ancestor. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #24 from David Cook <dcook@prosentient.com.au> --- Does that clarify things for everyone? If not, I'm happy to try to phrase it a different way. I should remember to do a Koha Advent post on this topic in December... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 --- Comment #25 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #24)
Does that clarify things for everyone?
If not, I'm happy to try to phrase it a different way.
I should remember to do a Koha Advent post on this topic in December...
Or maybe I should just write an explainer now and put it on the wiki... Next minute: https://wiki.koha-community.org/wiki/Git_fake_ancestor_error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40813 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #26 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, this no longer applies. Could you pleas re-base? I'll come back to this soon. Error: Apply failed: Git command (git am -3 /tmp/J5F2QLAlTE/0003-192169.patch) failed: error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc). error: could not build fake ancestor -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org