From 24970f0247f26de5af89b33b177f2ab8071e5fbc Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Sat, 7 May 2016 14:21:44 +0000 Subject: [PATCH] remove extra 1970 print --- .../files/getfedora-data.awk | 111 +++++++++--------- .../web-data-analysis/files/mirrors-data.awk | 4 +- 2 files changed, 60 insertions(+), 55 deletions(-) diff --git a/roles/web-data-analysis/files/getfedora-data.awk b/roles/web-data-analysis/files/getfedora-data.awk index bacb6f9752..d058f604ee 100644 --- a/roles/web-data-analysis/files/getfedora-data.awk +++ b/roles/web-data-analysis/files/getfedora-data.awk @@ -106,63 +106,66 @@ BEGIN{ } else { - print olddate "," total "," edit "," atomic "," cloud "," server "," workstation "," unk_edt "," f20 "," f21 "," f22 "," f23 "," f24 "," f25 "," f26 "," f27 "," f28 "," f29 "," unk_rel "," arm_32 "," arm_64 "," ppc_le "," ppc_he "," s390x "," x86_32 "," x86_64 "," unk_arc "," netinstall "," netserv "," network "," netclod "," spin "," xfce "," soas "," lxde "," secu "," robo "," mate "," scik "," jamk "," desi "," elec "," game "," mini "," cinn "," kde - olddate=$1 - total = 0; - #edition - atomic=0; - cloud=0; - server=0; - workstation=0; - edit = 0; - unk_edt=0; - # release - f20=0; - f21=0; - f22=0; - f23=0; - f24=0; - f25=0; - f26=0; - f27=0; - f28=0; - f29=0; - unk_rel=0; - # arch - arm_32=0; - arm_64=0; - x86_32=0; - x86_64=0; - ppc_le=0; - ppc_he=0; - s390x=0; - unk_arc=0; - # spins - spin = 0; - xfce = 0; - soas = 0; - lxde = 0; - secu = 0; - robo = 0; - mate = 0; - scik = 0; - jamk = 0; - desi = 0; - elec = 0; - game = 0; - mini = 0; - cinn = 0; - kde = 0; - # additional data - netinstall=0; - netserv=0; - network=0; - netclod=0; - } + if ( olddate !~ "1970-01-01" ) { + print olddate "," total "," edit "," atomic "," cloud "," server "," workstation "," unk_edt "," f20 "," f21 "," f22 "," f23 "," f24 "," f25 "," f26 "," f27 "," f28 "," f29 "," unk_rel "," arm_32 "," arm_64 "," ppc_le "," ppc_he "," s390x "," x86_32 "," x86_64 "," unk_arc "," netinstall "," netserv "," network "," netclod "," spin "," xfce "," soas "," lxde "," secu "," robo "," mate "," scik "," jamk "," desi "," elec "," game "," mini "," cinn "," kde; + }; + olddate=$1 + total = 0; + #edition + atomic=0; + cloud=0; + server=0; + workstation=0; + edit = 0; + unk_edt=0; + # release + f20=0; + f21=0; + f22=0; + f23=0; + f24=0; + f25=0; + f26=0; + f27=0; + f28=0; + f29=0; + unk_rel=0; + # arch + arm_32=0; + arm_64=0; + x86_32=0; + x86_64=0; + ppc_le=0; + ppc_he=0; + s390x=0; + unk_arc=0; + # spins + spin = 0; + xfce = 0; + soas = 0; + lxde = 0; + secu = 0; + robo = 0; + mate = 0; + scik = 0; + jamk = 0; + desi = 0; + elec = 0; + game = 0; + mini = 0; + cinn = 0; + kde = 0; + # additional data + netinstall=0; + netserv=0; + network=0; + netclod=0; + } + } END { - print olddate "," total "," edit "," atomic "," cloud "," server "," workstation "," unk_edt "," f20 "," f21 "," f22 "," f23 "," f24 "," unk_rel "," arm_32 "," arm_64 "," ppc_le "," ppc_he "," s390x "," x86_32 "," x86_64 "," unk_arc "," netinstall "," netserv "," network "," netclod "," spin "," xfce "," soas "," lxde "," secu "," robo "," mate "," scik "," jamk "," desi "," elec "," game "," mini "," cinn "," kde + print olddate "," total "," edit "," atomic "," cloud "," server "," workstation "," unk_edt "," f20 "," f21 "," f22 "," f23 "," f24 "," unk_rel "," arm_32 "," arm_64 "," ppc_le "," ppc_he "," s390x "," x86_32 "," x86_64 "," unk_arc "," netinstall "," netserv "," network "," netclod "," spin "," xfce "," soas "," lxde "," secu "," robo "," mate "," scik "," jamk "," desi "," elec "," game "," mini "," cinn "," kde } diff --git a/roles/web-data-analysis/files/mirrors-data.awk b/roles/web-data-analysis/files/mirrors-data.awk index 817d49053d..7767c64934 100644 --- a/roles/web-data-analysis/files/mirrors-data.awk +++ b/roles/web-data-analysis/files/mirrors-data.awk @@ -127,7 +127,9 @@ BEGIN{ else if ($4 ~"alpha") { alpha = alpha +1 } else {unknown_arch = unknown_arch +1; }; } else { - print olddate "," epel4 "," epel5 "," epel6 "," epel7 "," f03 "," f04 "," f05 "," f06 "," f07 "," f08 "," f09 "," f10 "," f11 "," f12 "," f13 "," f14 "," f15 "," f16 "," f17 "," f18 "," f19 "," f20 "," f21 "," f22 "," f23 "," f24 "," f25 "," f26 "," f27 "," f28 "," f29 "," rawhide "," unknown_release "," epel "," fedora "," alpha "," arm "," arm64 "," ia64 "," mips "," ppc "," s390 "," sparc "," tilegx "," x86_32 "," x86_64 "," x86_32_e "," x86_32_f "," x86_64_e "," x86_64_f "," ppc_e "," ppc_f "," unknown_arch "," centos "," rhel; + if ( olddate !~ "1970-01-01" ) { + print olddate "," epel4 "," epel5 "," epel6 "," epel7 "," f03 "," f04 "," f05 "," f06 "," f07 "," f08 "," f09 "," f10 "," f11 "," f12 "," f13 "," f14 "," f15 "," f16 "," f17 "," f18 "," f19 "," f20 "," f21 "," f22 "," f23 "," f24 "," f25 "," f26 "," f27 "," f28 "," f29 "," rawhide "," unknown_release "," epel "," fedora "," alpha "," arm "," arm64 "," ia64 "," mips "," ppc "," s390 "," sparc "," tilegx "," x86_32 "," x86_64 "," x86_32_e "," x86_32_f "," x86_64_e "," x86_64_f "," ppc_e "," ppc_f "," unknown_arch "," centos "," rhel; + }; olddate=$1 epel=0; fedora=0;