Skip to content
Closed
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
32 changes: 19 additions & 13 deletions .github/workflows/test-audience-sample-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,26 @@ jobs:
strategy:
fail-fast: false
matrix:
unity: ['2021.3.45f2', '6000.4.0f1', '2022.3.62f2']
target: [StandaloneWindows64, StandaloneOSX]
backend: [IL2CPP, Mono2x]
# Explicit per-cell entries instead of cartesian + partial-key
# include. The cartesian + partial-include shape used here
# previously had the include entries fail to merge runner and
# changeset onto the generated combos, so every cell had no
# runner and the playmode job spawned zero jobs (verified on
# runs 25604434621 and 25613048568). 12 explicit entries below
# is the bulletproof shape.
include:
- unity: '2021.3.45f2'
changeset: 88f88f591b2e
- unity: '6000.4.0f1'
changeset: 8cf496087c8f
- unity: '2022.3.62f2'
changeset: 7670c08855a9
- target: StandaloneWindows64
runner: [self-hosted, Windows, X64]
- target: StandaloneOSX
runner: [self-hosted, macOS, ARM64]
- { target: StandaloneWindows64, backend: IL2CPP, unity: '2021.3.45f2', changeset: 88f88f591b2e, runner: [self-hosted, Windows, X64] }
- { target: StandaloneWindows64, backend: Mono2x, unity: '2021.3.45f2', changeset: 88f88f591b2e, runner: [self-hosted, Windows, X64] }
- { target: StandaloneOSX, backend: IL2CPP, unity: '2021.3.45f2', changeset: 88f88f591b2e, runner: [self-hosted, macOS, ARM64] }
- { target: StandaloneOSX, backend: Mono2x, unity: '2021.3.45f2', changeset: 88f88f591b2e, runner: [self-hosted, macOS, ARM64] }
- { target: StandaloneWindows64, backend: IL2CPP, unity: '6000.4.0f1', changeset: 8cf496087c8f, runner: [self-hosted, Windows, X64] }
- { target: StandaloneWindows64, backend: Mono2x, unity: '6000.4.0f1', changeset: 8cf496087c8f, runner: [self-hosted, Windows, X64] }
- { target: StandaloneOSX, backend: IL2CPP, unity: '6000.4.0f1', changeset: 8cf496087c8f, runner: [self-hosted, macOS, ARM64] }
- { target: StandaloneOSX, backend: Mono2x, unity: '6000.4.0f1', changeset: 8cf496087c8f, runner: [self-hosted, macOS, ARM64] }
- { target: StandaloneWindows64, backend: IL2CPP, unity: '2022.3.62f2', changeset: 7670c08855a9, runner: [self-hosted, Windows, X64] }
- { target: StandaloneWindows64, backend: Mono2x, unity: '2022.3.62f2', changeset: 7670c08855a9, runner: [self-hosted, Windows, X64] }
- { target: StandaloneOSX, backend: IL2CPP, unity: '2022.3.62f2', changeset: 7670c08855a9, runner: [self-hosted, macOS, ARM64] }
- { target: StandaloneOSX, backend: Mono2x, unity: '2022.3.62f2', changeset: 7670c08855a9, runner: [self-hosted, macOS, ARM64] }
exclude: ${{ fromJSON(github.event_name == 'pull_request' && '[{"unity":"2022.3.62f2"}]' || '[]') }}
runs-on: ${{ matrix.runner }}
# Healthy cells finish in ~10 min. 30 min covers cold caches +
Expand Down

This file was deleted.

This file was deleted.

16 changes: 16 additions & 0 deletions src/Packages/Audience/Runtime/Transport/HttpTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,23 @@ internal async Task<bool> SendBatchAsync(CancellationToken ct = default)
request.Content = new StringContent(payload, Encoding.UTF8, "application/json");
#endif

// Temporary diagnostic markers to measure where SendBatchAsync
// spends time on Unity 6 Linux PlayMode cells (where each test
// sits at the 30 sec WaitForLogEntry budget on Mono Linux but
// finishes in 1-2 sec on Unity 2021.3 Linux). T1 is request
// start, T2 is response received (continuation alive), T3 is
// batch deletion + state reset done. Comparing T1->T2 vs
// T2->T3 gaps across Unity versions disambiguates whether the
// stall is in HttpClient.SendAsync (network/socket) or in the
// continuation back onto Unity's main thread (SyncContext).
var __t1 = System.Diagnostics.Stopwatch.StartNew();
Log.Debug($"[HttpTransport][T1] SendAsync start url={_url} count={batch.Count}");

using var response = await _client.SendAsync(request, ct).ConfigureAwait(false);

var __t2Ms = __t1.Elapsed.TotalMilliseconds;
Log.Debug($"[HttpTransport][T2] SendAsync done t1->t2={__t2Ms:F1}ms status={(int)response.StatusCode}");

var statusCode = (int)response.StatusCode;

if (statusCode >= 200 && statusCode < 300)
Expand All @@ -113,6 +128,7 @@ internal async Task<bool> SendBatchAsync(CancellationToken ct = default)
NotifyError(AudienceErrorCode.ValidationRejected,
$"Batch partially rejected: {rejected} of {batch.Count} events dropped");
}
Log.Debug($"[HttpTransport][T3] batch handled t1->t3={__t1.Elapsed.TotalMilliseconds:F1}ms (t2->t3={(__t1.Elapsed.TotalMilliseconds - __t2Ms):F1}ms)");
}
else if (statusCode == 429)
{
Expand Down
Loading