Parent Directory | Revision Log
check if deflate gets any benefits to single URL
1 | #!/bin/sh |
2 | |
3 | if [ -z "$1" ] ; then |
4 | echo "Usage: $0 http://www.example.com/" |
5 | exit 1 |
6 | else |
7 | url=$1 |
8 | fi |
9 | |
10 | time wget $url -O /tmp/foo |
11 | echo |
12 | time wget --header="Accept-Encoding: gzip" $url -O /tmp/foo.gz |
13 | echo |
14 | |
15 | orig_size=`ls -al /tmp/foo | awk '{ print $5 }'` |
16 | comp_size=`ls -al /tmp/foo.gz | awk '{ print $5 }'` |
17 | |
18 | if [ $comp_size -lt $orig_size ] ; then |
19 | echo "OK $comp_size < $orig_size"; |
20 | else |
21 | echo "ERROR: no visible compression benefits" |
22 | fi |
23 | |
24 | #ls -al /tmp/foo /tmp/foo.gz |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |