-
-
Save wuodland/6bbb35df2e7b24d987dbaa5b90d07b94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN{ | |
file_name_1 = ARGV[1] | |
results = "out2.txt" | |
print file_name_1 | |
hit = 0 | |
miss = 0 | |
satisfied = 0 | |
insatis = 0 | |
indata =0 | |
outdata=0 | |
} | |
{ | |
#FIFO | |
if(FILENAME == file_name_1) | |
{ | |
if($5 == "InInterests") | |
hit += $8 | |
if($5 == "OutInterests") | |
miss += $8 | |
if($5 == "SatisfiedInterests") | |
satisfied += $8 | |
if($5 == "InSatisfiedInterests") | |
insatis += $8 | |
if($5 == "InData") | |
indata += $8 | |
if($5 == "OutData") | |
outdata += $8 | |
} | |
} | |
END{ | |
print nocache_hit | |
printf " Algorithm Interests \n" > results | |
printf " InInterest %f \n", (hit) > results | |
printf " OutInterest %f \n", (miss) > results | |
printf " SatisfiedInterest %f \n", (satisfied) > results | |
printf " InSatisfiedInterests %f \n", (insatis) > results | |
printf " InData %f \n", (indata) > results | |
printf " Outdata %f \n", (outdata) > results | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
original script can be found at https://github.com/steps-to-reproduce/ndnSIM-awk