diff options
| author | Sadeep Madurange <sadeep@asciimx.com> | 2026-05-06 19:42:33 +0800 |
|---|---|---|
| committer | Sadeep Madurange <sadeep@asciimx.com> | 2026-05-06 19:42:33 +0800 |
| commit | 819bf74c2841fabdcc481e12e13615d48a92cb7f (patch) | |
| tree | 00ba8c9105a96d88536f50f8ef96e838c04408e3 /_site/cgi-bin/seed.sh | |
| parent | eddb76ad8c6e850c7e24f97ff27a185d48b104ee (diff) | |
| download | site-search-bm-819bf74c2841fabdcc481e12e13615d48a92cb7f.tar.gz | |
Change directory structure and add benchmark runner.
Diffstat (limited to '_site/cgi-bin/seed.sh')
| -rwxr-xr-x | _site/cgi-bin/seed.sh | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/_site/cgi-bin/seed.sh b/_site/cgi-bin/seed.sh deleted file mode 100755 index 5ae14df..0000000 --- a/_site/cgi-bin/seed.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/ksh - -# Set the number of files/dirs -TOTAL=500 -# Approximate size in blocks -BLOCK_SIZE=16 -COUNT=1 - -for i in $(seq 1 $TOTAL); do - # Create a unique directory name - DIR="site_$i" - mkdir -p "$DIR" - - # 1. Generate random valid ASCII (valid UTF-8) text - # We read more from urandom than needed because tr will filter some out - dd if=/dev/urandom bs=1024 count=$BLOCK_SIZE 2>/dev/null | tr -dc 'a-zA-Z0-9 \n' > "$DIR/index.html" - - # 2. Append the necessary HTML structure so your Perl regexes work - # This adds the <title> and <main> tags your script looks for - echo "<html><head><title>Site $i</title></head><body><main><p>Searchable content here for keyword_$i. Lorem ipsum text follows.</p></main></body></html>" >> "$DIR/index.html" - - # Optional: print progress every 100 files - if [ $((i % 100)) -eq 0 ]; then - echo "Created $i files..." - fi -done - -echo "Done! 10000 directories created with valid text." |
