Bugzilla – Attachment 117617 Details for
Bug 27048
Add timestamps to verbose output of rebuild_zebra.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27048: (follow-up) Correction to elapsed printing
Bug-27048-follow-up-Correction-to-elapsed-printing.patch (text/plain), 1.27 KB, created by
Jonathan Druart
on 2021-03-03 15:27:01 UTC
(
hide
)
Description:
Bug 27048: (follow-up) Correction to elapsed printing
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-03 15:27:01 UTC
Size:
1.27 KB
patch
obsolete
>From 46e4a2bd3982aba3819717ea2d4cc61488d17809 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 1 Mar 2021 14:00:39 +0000 >Subject: [PATCH] Bug 27048: (follow-up) Correction to elapsed printing > >JD Amended patch: Remove perlcritic error >"$d" is declared but not used at line 839, column 5. Unused variables clutter code and make it harder to read. (Severity: 3) >--- > misc/migration_tools/rebuild_zebra.pl | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl >index 8fd611a83b..18da8026ad 100755 >--- a/misc/migration_tools/rebuild_zebra.pl >+++ b/misc/migration_tools/rebuild_zebra.pl >@@ -836,17 +836,15 @@ sub pretty_time { > my $now = time; > my $elapsed = $now - $start_time; > local $_ = $elapsed; >- my ( $d, $h, $m, $s ); >+ my ( $h, $m, $s ); > $s = $_ % 60; > $_ /= 60; > $m = $_ % 60; > $_ /= 60; > $h = $_ % 24; >- $_ /= 24; >- $d = $_; > > my $now_pretty = POSIX::strftime("%H:%M:%S",localtime($now)); >- my $elapsed_pretty = $d ? "[$d:$h:$m:$s]" : $h ? "[$h:$m:$s]" : $m ? "[$m:$s]" : "[$s]"; >+ my $elapsed_pretty = sprintf "[%02d:%02d:%02d]",$h,$m,$s; > > return "$now_pretty $elapsed_pretty"; > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27048
:
113773
|
113780
|
115931
|
117201
|
117418
|
117452
| 117617