Skip to content

Commit be8f77b

Browse files
committed
Improvements.
1 parent b9c03c5 commit be8f77b

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

tests/sampletester/ProcessHelper.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ public static void BuildSolution (string solution, string platform, string confi
203203
xml.WriteAttributeString ("xamarin-macios-hash", Configuration.TestedHash);
204204
xml.WriteAttributeString ("sample-repository", Configuration.GetCurrentRemoteUrl (slndir));
205205
xml.WriteAttributeString ("sample-hash", Configuration.GetCurrentHash (slndir));
206+
xml.WriteAttributeString ("agent-machinename", Environment.GetEnvironmentVariable ("AGENT_MACHINENAME"));
207+
xml.WriteAttributeString ("agent-name", Environment.GetEnvironmentVariable ("AGENT_NAME"));
206208
foreach (var app in apps) {
207209
xml.WriteStartElement ("test");
208210
xml.WriteAttributeString ("name", TestContext.CurrentContext.Test.FullName);
@@ -287,7 +289,6 @@ public static void BuildSolution (string solution, string platform, string confi
287289
xml.Dispose ();
288290

289291
TestContext.AddTestAttachment (logfile, $"Performance data");
290-
// Console.WriteLine ("Performance data: {0}:\n\t{1}", logfile, string.Join ("\n\t", File.ReadAllLines (logfile)));
291292
}
292293
}
293294

tools/devops/push-performance-data.sh

+11-5
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,21 @@ done
1212
# Merge each individual xml file into one big xml file
1313
DIR=perf-data/samples/$BUILD_SOURCEBRANCHNAME/$BUILD_SOURCEVERSION
1414
cd "$DIR"
15+
# Merge the xml files from each bot into a big per-bot xml file. Don't merge
16+
# the xml from all the bots together into a single enormous xml file, because
17+
# it'll be close to GitHub's size limit per file (limit is 100mb, the enormous
18+
# xml file would be ~80mb now), and might very well pass that one day.
19+
for job in ./*-*-*-*-*; do
1520
{
1621
echo '<?xml version="1.0" encoding="utf-8" standalone="yes"?>'
17-
echo '<performance>'
18-
find . -name '*perfdata*.xml' -print0 | xargs -0 -n 1 tail -n +2 | grep -F -v -e '<performance>' -e '</performance>'
22+
echo '<performance version="1.0">'
23+
find "$job" -name '*perfdata*.xml' -print0 | xargs -0 -n 1 tail -n +2 | grep -F -v -e '<performance>' -e '</performance>'
1924
echo '</performance>'
20-
} > data.xml
25+
} > "data-$job.xml"
26+
done
2127

22-
# Add the big xml file to git
23-
git add data.xml
28+
# Add the big xml files to git
29+
git add data-*.xml
2430
git commit -m "Add performance data for $BUILD_SOURCEBRANCHNAME/$BUILD_SOURCEVERSION."
2531

2632
# Push!

0 commit comments

Comments
 (0)