Skip to content

Instantly share code, notes, and snippets.

@dtikhonov
Created November 5, 2019 13:51
Show Gist options
  • Save dtikhonov/4ce66dd414e2f446445b5e069fba81cf to your computer and use it in GitHub Desktop.
Save dtikhonov/4ce66dd414e2f446445b5e069fba81cf to your computer and use it in GitHub Desktop.
Make website for HTTP/3 performance test
#!/bin/bash
set -ex
mkdir $1
cd $1
cat >index.html <<HTML
<h1>Index</h1>
<ul>
<li><a href=file-1M>1 MB file</a>
<li><a href=file-10M>10 MB</a>
<li><a href=file-100M>100 MB file</a>
<li><a href=file-1G>1 GB file</a>
</ul>
HTML
dd if=/dev/zero of=file-1M bs=1 count=0 seek=$[1<<20]
dd if=/dev/zero of=file-10M bs=1 count=0 seek=$[10*(1<<20)]
dd if=/dev/zero of=file-100M bs=1 count=0 seek=$[100*(1<<20)]
dd if=/dev/zero of=file-1G bs=1 count=0 seek=$[1<<30]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment