[Bug 19190] New: Silly calculation of average time in touch_all scripts
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Bug ID: 19190 Summary: Silly calculation of average time in touch_all scripts Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz When you want to calculate average time, do not divide count by time :) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=19190 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 66550 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66550&action=edit Bug 19190: Silly calculation of average time in touch_all scripts When you want to calculate average time, do not divide count by time :) Test plan: Run the script with a where condition and verbose option and see that the average time is meaningful. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- 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=19190 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 66551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66551&action=edit Bug 19190: [Follow-up] Do not rely on the return of ModItem touch_all_items looks at the return of ModItem to determine if the operation was successful. But ModItem does not return a meaningful value. This patch puts the ModItem call in an eval and looks at $@. Test plan: Run touch_all_items with a where condition and verbose option. Put print 1/0; at the end of ModItem. Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | Severity|enhancement |trivial -- 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=19190 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66551|0 |1 is obsolete| | --- Comment #3 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 67332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67332&action=edit Bug 19190: [Follow-up] Do not rely on the return of ModItem touch_all_items looks at the return of ModItem to determine if the operation was successful. But ModItem does not return a meaningful value. This patch puts the ModItem call in an eval and looks at $@. Test plan: Run touch_all_items with a where condition and verbose option. Put print 1/0; at the end of ModItem. Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david.bourgault@inlibro.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #66550|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 67499 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67499&action=edit Bug 19190: Silly calculation of average time in touch_all scripts When you want to calculate average time, do not divide count by time :) Test plan: Run the script with a where condition and verbose option and see that the average time is meaningful. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67332|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 67500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67500&action=edit Bug 19190: [Follow-up] Do not rely on the return of ModItem touch_all_items looks at the return of ModItem to determine if the operation was successful. But ModItem does not return a meaningful value. This patch puts the ModItem call in an eval and looks at $@. Test plan: Run touch_all_items with a where condition and verbose option. Put print 1/0; at the end of ModItem. Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to David Bourgault from comment #3)
Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Thanks, David. I added your signoff line also to the first patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67499|0 |1 is obsolete| | Attachment #67500|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 67752 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67752&action=edit Bug 19190: Silly calculation of average time in touch_all scripts When you want to calculate average time, do not divide count by time :) Test plan: Run the script with a where condition and verbose option and see that the average time is meaningful. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 67753 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67753&action=edit Bug 19190: [Follow-up] Do not rely on the return of ModItem touch_all_items looks at the return of ModItem to determine if the operation was successful. But ModItem does not return a meaningful value. This patch puts the ModItem call in an eval and looks at $@. Test plan: Run touch_all_items with a where condition and verbose option. Put print 1/0; at the end of ModItem. Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Backport ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19190 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #11 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x, will be in 17.05.07 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org