-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snapshots example, glob loading, grouming (#30)
* snapshots example, glob loading, grouming
- Loading branch information
Showing
7 changed files
with
52 additions
and
25 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
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
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,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
# working directory for snapshots | ||
OUT=snapshots | ||
# number of snapshots to take | ||
COUNT=5 | ||
# wait time (in seconds) between each snapshot | ||
WAIT=10 | ||
|
||
mkdir -p "${OUT}" | ||
|
||
for i in $(seq 1 ${COUNT}); do | ||
echo "Taking snapshot ${i}..." | ||
|
||
decompose -format json -out "${OUT}/snapshot_${i}.json" | ||
|
||
if [[ "${i}" -ne "${COUNT}" ]]; then | ||
echo "Sleeping for ${WAIT} seconds..." | ||
sleep "${WAIT}" | ||
fi | ||
done | ||
|
||
echo "Merging..." | ||
|
||
decompose -load "${OUT}/*.json" -format json -out merged.json | ||
|
||
echo "Cleaning-up..." | ||
|
||
rm -rf "${OUT}" |
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