-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for generating metrics on read_root
- Loading branch information
Brett Beutell
committed
May 31, 2023
1 parent
2912896
commit c8cce38
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# This script will fetch a URL using curl at a random interval between 100ms and 5s | ||
while true; do | ||
# Generate a random sleep time between 100ms and 5s | ||
sleep_time=$(awk -v min=0.1 -v max=5 'BEGIN{srand(); print int(min+rand()*(max-min+1))}') | ||
sleep "$sleep_time" | ||
|
||
# Fetch the URL using curl | ||
curl -s -o /dev/null "https://example.com" # Replace "https://example.com" with your desired URL | ||
done |