feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization
This commit is contained in:
parent
a88aafa1e5
commit
0e568f1f0a
975 changed files with 130593 additions and 16783 deletions
84
tests/Paca.Tests/Core/NetworkLatencyJitterGateTests.cs
Normal file
84
tests/Paca.Tests/Core/NetworkLatencyJitterGateTests.cs
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Paca.Mobile.Core;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.Core;
|
||||
|
||||
public class NetworkLatencyJitterGateTests
|
||||
{
|
||||
[Fact]
|
||||
public void Gate365_NetworkLatencyJitter_EvaluatesExcellentHealth_OnLowLatency()
|
||||
{
|
||||
var samples = new List<LatencySample>
|
||||
{
|
||||
new(15.0, true),
|
||||
new(18.0, true),
|
||||
new(16.0, true),
|
||||
new(17.0, true),
|
||||
new(15.0, true)
|
||||
};
|
||||
|
||||
var report = NetworkLatencyJitterProber.AnalyzeSamples(samples);
|
||||
|
||||
Assert.Equal(NetworkHealthRating.Excellent, report.Rating);
|
||||
Assert.InRange(report.AverageRttMs, 16.0, 16.5);
|
||||
Assert.True(report.JitterMs < 5.0);
|
||||
Assert.Equal(0.0, report.PacketLossPercent);
|
||||
Assert.Contains("초고속", report.Recommendation);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate366_NetworkLatencyJitter_DetectsPacketLoss_AndDegradesRating()
|
||||
{
|
||||
var samples = new List<LatencySample>
|
||||
{
|
||||
new(30.0, true),
|
||||
new(0.0, false), // Lost
|
||||
new(35.0, true),
|
||||
new(40.0, true),
|
||||
new(0.0, false) // Lost
|
||||
};
|
||||
|
||||
// 2 out of 5 lost = 40% loss
|
||||
var report = NetworkLatencyJitterProber.AnalyzeSamples(samples);
|
||||
|
||||
Assert.True(report.Rating == NetworkHealthRating.Degraded || report.Rating == NetworkHealthRating.Poor);
|
||||
Assert.Equal(40.0, report.PacketLossPercent);
|
||||
Assert.Contains("패킷 손실", report.Recommendation);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate367_NetworkLatencyJitter_EvaluatesPoor_OnHighJitterAndLatency()
|
||||
{
|
||||
var samples = new List<LatencySample>
|
||||
{
|
||||
new(450.0, true),
|
||||
new(200.0, true),
|
||||
new(550.0, true),
|
||||
new(180.0, true)
|
||||
};
|
||||
|
||||
var report = NetworkLatencyJitterProber.AnalyzeSamples(samples);
|
||||
|
||||
Assert.Equal(NetworkHealthRating.Poor, report.Rating);
|
||||
Assert.True(report.AverageRttMs > 300.0);
|
||||
Assert.True(report.JitterMs > 100.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Gate368_NetworkLatencyJitter_HandlesEmptyOrTotalLossGracefully()
|
||||
{
|
||||
var empty = NetworkLatencyJitterProber.AnalyzeSamples(new List<LatencySample>());
|
||||
Assert.Equal(NetworkHealthRating.Poor, empty.Rating);
|
||||
Assert.Equal(100.0, empty.PacketLossPercent);
|
||||
|
||||
var totalLoss = NetworkLatencyJitterProber.AnalyzeSamples(new List<LatencySample>
|
||||
{
|
||||
new(0.0, false),
|
||||
new(0.0, false)
|
||||
});
|
||||
Assert.Equal(NetworkHealthRating.Poor, totalLoss.Rating);
|
||||
Assert.Equal(100.0, totalLoss.PacketLossPercent);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue