Stop running and publishing performance metrics to gh-pages

This commit is contained in:
Stefan Ceriu 2024-09-05 13:49:56 +03:00
parent fbca83ba5f
commit dc85cb10ed
4 changed files with 0 additions and 101 deletions

View File

@ -59,23 +59,6 @@ jobs:
path: ~/Library/Logs/scan/IntegrationTests-IntegrationTests.log path: ~/Library/Logs/scan/IntegrationTests-IntegrationTests.log
retention-days: 2 retention-days: 2
if-no-files-found: ignore if-no-files-found: ignore
- name: Checkout gh-pages branch (for perf stats)
if: always()
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Post-process archive to obtain performance metrics and upload to gh-pages
if: always()
run: |
./Tools/Scripts/parsePerformanceMetrics.sh ~/Library/Logs/scan/IntegrationTests-IntegrationTests.log $GITHUB_SHA | tee perf-results.csv
cat perf-results.csv >> $GITHUB_WORKSPACE/gh-pages/performance/perf-data.csv
cd $GITHUB_WORKSPACE/gh-pages/performance/
git add .
git commit -m "Results for $GITHUB_SHA"
git push
- name: Collect coverage - name: Collect coverage
run: xcresultparser -q -o cobertura -t ElementX -p $(pwd) fastlane/test_output/IntegrationTests.xcresult > fastlane/test_output/integration-cobertura.xml run: xcresultparser -q -o cobertura -t ElementX -p $(pwd) fastlane/test_output/IntegrationTests.xcresult > fastlane/test_output/integration-cobertura.xml

View File

@ -819,7 +819,6 @@
B79E8AB83EBBDCD476D0362F /* PollFormScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D622EC7898469BB1D0881CDD /* PollFormScreen.swift */; }; B79E8AB83EBBDCD476D0362F /* PollFormScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D622EC7898469BB1D0881CDD /* PollFormScreen.swift */; };
B7C9E07F4F9CCC8DD7156A20 /* CallScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28146817C61423CACCF942F5 /* CallScreenModels.swift */; }; B7C9E07F4F9CCC8DD7156A20 /* CallScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28146817C61423CACCF942F5 /* CallScreenModels.swift */; };
B818580464CFB5400A3EF6AE /* TimelineModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 029D5701F80A9AF7167BB4D0 /* TimelineModels.swift */; }; B818580464CFB5400A3EF6AE /* TimelineModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 029D5701F80A9AF7167BB4D0 /* TimelineModels.swift */; };
B828C600A54B2EE20871A451 /* PerformanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD700E035C85738EE4B97129 /* PerformanceTests.swift */; };
B879446FD8E65A711EF8F9F7 /* AdvancedSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */; }; B879446FD8E65A711EF8F9F7 /* AdvancedSettingsScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63B69F9A2BC74DD40DC75C8 /* AdvancedSettingsScreenViewModel.swift */; };
B89990DD875B0B603D4D4332 /* NotificationItemProxyProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B927CF5EF7FCCDA5EDC474B /* NotificationItemProxyProtocol.swift */; }; B89990DD875B0B603D4D4332 /* NotificationItemProxyProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B927CF5EF7FCCDA5EDC474B /* NotificationItemProxyProtocol.swift */; };
B93D7CE520088AD53FA6D53C /* SettingsScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B663BE498BB39EADC24025D /* SettingsScreenModels.swift */; }; B93D7CE520088AD53FA6D53C /* SettingsScreenModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B663BE498BB39EADC24025D /* SettingsScreenModels.swift */; };
@ -2068,7 +2067,6 @@
CCF71646898A2F720C5BFDF5 /* RoomDirectorySearchScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDirectorySearchScreenViewModel.swift; sourceTree = "<group>"; }; CCF71646898A2F720C5BFDF5 /* RoomDirectorySearchScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomDirectorySearchScreenViewModel.swift; sourceTree = "<group>"; };
CD469F7513574341181F7EAA /* ServerSelectionScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionScreen.swift; sourceTree = "<group>"; }; CD469F7513574341181F7EAA /* ServerSelectionScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServerSelectionScreen.swift; sourceTree = "<group>"; };
CD6613DE16AD26B3A74DA1F5 /* LocationRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationRoomTimelineItemContent.swift; sourceTree = "<group>"; }; CD6613DE16AD26B3A74DA1F5 /* LocationRoomTimelineItemContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationRoomTimelineItemContent.swift; sourceTree = "<group>"; };
CD700E035C85738EE4B97129 /* PerformanceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PerformanceTests.swift; sourceTree = "<group>"; };
CDB3227C7A74B734924942E9 /* RoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProvider.swift; sourceTree = "<group>"; }; CDB3227C7A74B734924942E9 /* RoomSummaryProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomSummaryProvider.swift; sourceTree = "<group>"; };
CDE3F3911FF7CC639BDE5844 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; }; CDE3F3911FF7CC639BDE5844 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
CEE20623EB4A9B88FB29F2BA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SAS.strings; sourceTree = "<group>"; }; CEE20623EB4A9B88FB29F2BA /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/SAS.strings; sourceTree = "<group>"; };
@ -3333,7 +3331,6 @@
children = ( children = (
D33116993D54FADC0C721C1F /* Application.swift */, D33116993D54FADC0C721C1F /* Application.swift */,
D1BC84BA0AF11C2128D58ABD /* Common.swift */, D1BC84BA0AF11C2128D58ABD /* Common.swift */,
CD700E035C85738EE4B97129 /* PerformanceTests.swift */,
9C4048041C1A6B20CB97FD18 /* TestMeasurementParser.swift */, 9C4048041C1A6B20CB97FD18 /* TestMeasurementParser.swift */,
21DD8599815136EFF5B73F38 /* UserFlowTests.swift */, 21DD8599815136EFF5B73F38 /* UserFlowTests.swift */,
); );
@ -6945,7 +6942,6 @@
1702981A8085BE4FB0EC001B /* Application.swift in Sources */, 1702981A8085BE4FB0EC001B /* Application.swift in Sources */,
388D39ED9FE1122EA6D76BF2 /* Common.swift in Sources */, 388D39ED9FE1122EA6D76BF2 /* Common.swift in Sources */,
A439B456D0761D6541745CC3 /* NSRegularExpresion.swift in Sources */, A439B456D0761D6541745CC3 /* NSRegularExpresion.swift in Sources */,
B828C600A54B2EE20871A451 /* PerformanceTests.swift in Sources */,
88356DE7F2AD243AB10C7B7A /* Signposter.swift in Sources */, 88356DE7F2AD243AB10C7B7A /* Signposter.swift in Sources */,
290FDB0FFDC2F1DDF660343E /* TestMeasurementParser.swift in Sources */, 290FDB0FFDC2F1DDF660343E /* TestMeasurementParser.swift in Sources */,
32B7891D937377A59606EDFC /* UserFlowTests.swift in Sources */, 32B7891D937377A59606EDFC /* UserFlowTests.swift in Sources */,

View File

@ -1,55 +0,0 @@
//
// Copyright 2022 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import XCTest
class PerformanceTests: XCTestCase {
func testLoginFlow() throws {
let parser = TestMeasurementParser()
parser.capture(testCase: self) {
let metrics: [XCTMetric] = [
XCTApplicationLaunchMetric(),
XCTClockMetric(),
XCTOSSignpostMetric(subsystem: Signposter.subsystem, category: Signposter.category, name: "\(Signposter.Name.login)"),
XCTOSSignpostMetric(subsystem: Signposter.subsystem, category: Signposter.category, name: "\(Signposter.Name.firstSync)"),
XCTOSSignpostMetric(subsystem: Signposter.subsystem, category: Signposter.category, name: "\(Signposter.Name.firstRooms)"),
XCTOSSignpostMetric(subsystem: Signposter.subsystem, category: Signposter.category, name: "\(Signposter.Name.roomFlow)")
]
self.measure(metrics: metrics) {
self.runLoginLogoutFlow()
}
}
}
private func runLoginLogoutFlow() {
let app = Application.launch()
app.login(currentTestCase: self)
// Open the first room in the list.
let firstRoom = app.buttons.matching(NSPredicate(format: "identifier BEGINSWITH %@", A11yIdentifiers.homeScreen.roomNamePrefix)).firstMatch
XCTAssertTrue(firstRoom.waitForExistence(timeout: 10.0))
firstRoom.tap()
// Go back to the room list
let backButton = app.navigationBars.firstMatch.buttons["Chats"]
XCTAssertTrue(backButton.waitForExistence(timeout: 10.0))
backButton.tap()
app.logout()
}
}

View File

@ -1,25 +0,0 @@
#!/bin/bash
# Parses performance metrics from the full report of a IntegrationTest run (do not use xcpretty first!)
# This file can normally be found in `~/Library/Logs/scan/IntegrationTests-IntegrationTests.log`
# Provide file as $1
# Provide identifier (eg, date, GITHUB_SHA) as $2
echo "Parsing $1 for test results with identifier $2" >&2
NOW=`date -u -Iminutes`
# Find all the measurement lines in the file, then strip out the gumph into a CSV-like format.
grep ".*measured.*values" $1 | sed -e "s/.*Test Case .*-\[//" -e "s/\]' measured \[/,/" -e "s/\].*values: \[/,/" -e "s/\], performance.*//" -e "s/^/$2,/" \
-e "s/IntegrationTests.PerformanceTests testLoginFlow,Duration .AppLaunch., s/launchPerformance/" \
-e "s/IntegrationTests.PerformanceTests testLoginFlow,Duration .Login., s/loginPerformance/" \
-e "s/IntegrationTests.PerformanceTests testLoginFlow,Duration .RoomFlow., s/roomFlowPerformance/" \
-e "s/IntegrationTests.PerformanceTests testLoginFlow,Duration .FirstRooms., s/firstRoomsPerformance/" \
-e "s/IntegrationTests.PerformanceTests testLoginFlow,Duration .FirstSync., s/firstSyncPerformance/" \
-e "s/IntegrationTests.PerformanceTests testLoginFlow,Clock Monotonic Time, s/totalTime/" \
-e "s/^/$NOW,/"
# The output should contain fields for the identifier, name, type, unit, then a list of recorded values (normally 5)
# Put this into a file somewhere for later usage.