Created
May 15, 2018 09:43
-
-
Save willtonkin/6963229276f24632317bd6059ffb23c6 to your computer and use it in GitHub Desktop.
get AEM component render timings on author
This file contains hidden or 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
#!/bin/bash | |
RAND="$RANDOM" | |
server="http://localhost:4502" | |
#workingPath="/content/wel-demo" | |
#relPath="/en" | |
workingPath="/content/ewp-marketing-websites/thomsonreuters/gl/en/about-us" | |
relPath="/executive-team" | |
curl -f -u admin:admin -F:operation=copy -F:dest=$workingPath/$RAND $server$workingPath$relPath | |
#curl -u admin:admin $server$workingPath/$RAND.html | \ | |
#curl -u admin:admin $server/content/geometrixx-outdoors/en.html | \ | |
cat untitled.log | \ | |
awk ' /'\<\!--cq'/ {print $0}' | \ | |
awk -F "," ' | |
{ | |
for (i=0; i<=NF; i++) { | |
if ($i~/^\"type\"/) { | |
a=$i | |
} | |
if ($i~/^\"path\"/) { | |
b=$i | |
} | |
if ($i~/^\"totalTime\"/) { | |
c=$i | |
} | |
} | |
print substr(a, 9, length(a) - 9), | |
substr(b, 9, length(b) - 9), | |
substr(c, 13) "ms" | |
} | |
' | |
echo $server$workingPath/$RANDOM.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment