Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/CSharpTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,20 @@ jobs:
# Simplify on the cubic row of RationalIntegralsTest recursed deeper than a 1 MB stack holds,
# and the leg ran 2,094 to 8,507 of the tests. A Release build passes that row on 512 KB.
# https://github.com/asc-community/AngouriMath/issues/397
#
# SingleHit records whether a line ran, not how often. By default coverlet counts every hit
# with an interlocked increment on one shared array, and tests running in parallel then fight
# over the same cache lines. On four cores, as many as the runner has, that made the Calculus
# area take 315 s against 161 s without coverage. The integral of 1/(a + sin(x)) over
# [0, 2 pi] took 28 s against 10 s, and it hit its 60 s timeout on this leg alone. With
# SingleHit those were 209 s and 10 s, and the report visited the same 58,219 sequence points.
# https://github.com/asc-community/AngouriMath/issues/2671
- name: Test if to send
if: ${{ matrix.os == 'windows-latest' }}
shell: bash
run: |
cd Sources/Tests/UnitTests
dotnet test -c Release --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
dotnet test -c Release --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.SingleHit=true
cd ../../Utils/Utils
dotnet run CopyCovReport

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,20 @@ namespace AngouriMath.Tests.Calculus
[Trait("Area", "Calculus")]
public sealed class ALimitAtABreakIsRememberedTest
{
/// <remarks>
/// The wall sits between the two behaviours on the desktop. Alone, the sine integral takes 6 s with the
/// limits remembered and 190 s without them. In the Calculus area on four cores it takes 10 s. The wall was
/// 60 s, and it fired on the Windows runner, the one leg that ran under coverlet's counting of hits, where the
/// same run took 28 s. 120 s leaves that leg room and still fails on the 190 s regression.
/// https://github.com/asc-community/AngouriMath/issues/2671
/// </remarks>
[Theory]
[InlineData("1/(a + sin(x))", "0", "2 pi")]
[InlineData("1/(a + cos(x))", "0", "pi")]
public void AParametricIntegralAcrossAPoleIsLeftUnevaluatedInTime(string integrand, string from, string to)
{
var task = Task.Run(() => integrand.ToEntity().Integrate("x", from.ToEntity(), to.ToEntity()).Simplify());
Assert.True(task.Wait(TimeSpan.FromSeconds(60)), $"{integrand} over [{from}, {to}] did not finish");
Assert.True(task.Wait(TimeSpan.FromSeconds(120)), $"{integrand} over [{from}, {to}] did not finish");
Assert.Contains(task.Result.Nodes, node => node is Integralf);
}

Expand Down
Loading