-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into gaopeng/131binary
- Loading branch information
Showing
412 changed files
with
63,440 additions
and
21,293 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,38 @@ | ||
name: $(Date:yyyyMMdd)$(Rev:.r)_$(Build.SourceBranchName)_$(BuildID) | ||
trigger: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
include: | ||
- schemas | ||
- vhdbuilder/packer | ||
- vhdbuilder/scripts/linux | ||
- .pipelines/.vsts-vhd-refresh-testdata.yaml | ||
- parts/linux/* | ||
- packer.mk | ||
exclude: | ||
- vhdbuilder/packer/*.ps1 | ||
- vhdbuilder/packer/**/*.ps1 | ||
- vhdbuilder/packer/*windows* | ||
- vhdbuilder/packer/**/*windows* | ||
|
||
pool: | ||
name: $(POOL_NAME) | ||
|
||
stages: | ||
- stage: Generate_and_Publish_Testdata | ||
condition: succeeded() | ||
jobs: | ||
- job: Generate_Publish_Testdata | ||
timeoutInMinutes: 10 | ||
steps: | ||
- bash: | | ||
make generate | ||
displayName: Generate Testdata | ||
- task: PublishPipelineArtifact@1 | ||
inputs: | ||
targetPath: $(Pipeline.Workspace)/s/pkg/agent/testdata | ||
artifact: testdata | ||
publishLocation: pipeline | ||
|
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
65 changes: 65 additions & 0 deletions
65
parts/linux/cloud-init/artifacts/cse_benchmark_functions.sh
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,65 @@ | ||
#!/bin/bash | ||
|
||
script_start_stopwatch=$(date +%s) | ||
section_start_stopwatch=$(date +%s) | ||
SCRIPT_NAME=$(basename $0 .sh) | ||
SCRIPT_NAME="${SCRIPT_NAME//-/_}" | ||
declare -A benchmarks=() | ||
declare -a benchmarks_order=() | ||
|
||
check_array_size() { | ||
declare -n array_name=$1 | ||
local array_size=${#array_name[@]} | ||
if [[ ${array_size} -gt 0 ]]; then | ||
last_index=$(( ${#array_name[@]} - 1 )) | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
capture_benchmark() { | ||
set +x | ||
local title="$1" | ||
title="${title//[[:space:]]/_}" | ||
title="${title//-/_}" | ||
local is_final_section=${2:-false} | ||
|
||
local current_time | ||
current_time=$(date +%s) | ||
if [[ "$is_final_section" == true ]]; then | ||
local start_time=$script_start_stopwatch | ||
else | ||
local start_time=$section_start_stopwatch | ||
fi | ||
|
||
local total_time_elapsed | ||
total_time_elapsed=$(date -d@$((current_time - start_time)) -u +%H:%M:%S) | ||
benchmarks[$title]=${total_time_elapsed} | ||
benchmarks_order+=($title) # use this array to maintain order of benchmarks | ||
|
||
# reset timers for next section | ||
section_start_stopwatch=$(date +%s) | ||
} | ||
|
||
process_benchmarks() { | ||
set +x | ||
|
||
if [ ! -f ${PERFORMANCE_DATA_FILE} ]; then | ||
echo '{}' > ${PERFORMANCE_DATA_FILE} | ||
fi | ||
|
||
check_array_size benchmarks || { echo "Benchmarks array is empty"; return; } | ||
# create script object, then append each section object to it in the for loop | ||
script_object=$(jq -n --arg script_name "${SCRIPT_NAME}" '{($script_name): {}}') | ||
|
||
for ((i=0; i<${#benchmarks_order[@]}; i+=1)); do | ||
section_name=${benchmarks_order[i]} | ||
section_object=$(jq -n --arg section_name "${section_name}" --arg total_time_elapsed "${benchmarks[${section_name}]}" \ | ||
'{($section_name): $total_time_elapsed'}) | ||
script_object=$(jq -n --argjson script_object "$script_object" --argjson section_object "$section_object" --arg script_name "${SCRIPT_NAME}" \ | ||
'$script_object | .[$script_name] += $section_object') | ||
done | ||
|
||
jq ". += $script_object" ${PERFORMANCE_DATA_FILE} > temp-perf-file.json && mv temp-perf-file.json ${PERFORMANCE_DATA_FILE} | ||
chmod 755 ${PERFORMANCE_DATA_FILE} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"ostype": "LinuxSIGImageVersion", | ||
"version": "202409.30.0" | ||
"version": "202410.09.0" | ||
} |
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
Oops, something went wrong.