Testim, 0,5 saniyeden daha yavaş çalışırsa başarısız olur, ancak ortalama süre yalnızca konsolda yazdırılır ve ona erişmenin bir yolunu bulamıyorum. Bu verilere erişmenin bir yolu var mı?Çok yavaşsa bir performans testi nasıl başarısız olur?
Kod
//Measures the time it takes to parse the participant codes from the first 100 events in our test data.
func testParticipantCodeParsingPerformance()
{
var increment = 0
self.measureBlock
{
increment = 0
while increment < 100
{
Parser.parseParticipantCode(self.fields[increment], hostCodes: MasterCalendarArray.getHostCodeArray()[increment])
increment++
}
}
print("Events measured: \(increment)")
}
Test Verileri
[Tests.ParserTest testParticipantCodeParsingPerformance] ölçülen [Zaman, saniye] ortalama: 0.203, nispi standart sapma: 19,951,% değerleri: [0.186405, 0.182292, 0.179966, 0.177797, 0.175820, 0.205763, 0.315636, 0.223014, 0.200362, 0.178165]
Bunlar iyi çalıştı ama onlar sadece benim makinede lokal olarak çalışabilir onların taban çizgileri ayarlanmamıştır. Bu temel çizgiyi git projesine dahil etmenin bir yolu var mı? – Deco
İşi bu yapan https://stackoverflow.com/a/46563991/957245 – Deco