Add enterprise features: timeout handling, duration tracking, and health checking
- Add timeout handling to PHP syntax validation - Add execution duration tracking to smoke_test and validate_all - Create script_health.sh to validate enterprise standards compliance - Enhance error messages with better context and actionable guidance - Add log_duration helper function to common.sh - Update ENTERPRISE.md and README.md with new features - All scripts now follow complete enterprise standards Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
@@ -170,3 +170,17 @@ log_timestamp() {
|
||||
printf '%s\n' "$(date -u '+%Y-%m-%d %H:%M:%S UTC')"
|
||||
fi
|
||||
}
|
||||
|
||||
# Calculate and log execution duration
|
||||
log_duration() {
|
||||
local start="$1"
|
||||
local end="$2"
|
||||
local duration=$((end - start))
|
||||
if [ "$duration" -ge 60 ]; then
|
||||
local minutes=$((duration / 60))
|
||||
local seconds=$((duration % 60))
|
||||
printf '%dm %ds\n' "$minutes" "$seconds"
|
||||
else
|
||||
printf '%ds\n' "$duration"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user