Skip to content

Commit 42f07c7

Browse files
[profiled-aot] update profile for .NET 8 GA (#8428)
First, I had to update the URL we test, because it was down: https://httpstat.us/200 Instead, I used: https://httpbin.org/status/200 Next, after reviewing the latest methods in the profile, I noticed a lot of timezone logic was completely removed. This might be related to different cookies returns from the new URL, not sure. I added a `DateTime.Now` call to `CommonMethods.cs`, to ensure the timezone logic is in the AOT profile. Testing a `dotnet new android` app on a Pixel 5, an average of 10 runs of the "displayed time`: Average(ms): 179.1 Std Err(ms): 2.53179778023443 Std Dev(ms): 8.00624756049924
1 parent 94ce670 commit 42f07c7

File tree

3 files changed

+33
-147
lines changed

3 files changed

+33
-147
lines changed

src/profiled-aot/CommonMethods.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// This class represents common code paths we always want to AOT
22

3+
// DateTime.Now
34
// string interpolation & split
45
// int.Parse(), int.ToString()
56
// Culture-aware string comparisons
@@ -15,8 +16,11 @@ static class CommonMethods
1516
// Returns '200 OK' if the caller wants to set that on the UI
1617
public static async Task<string> Invoke()
1718
{
18-
var url = $"https://httpstat.us/{200}";
19+
// NOTE: alternate web services if one of these is down
20+
//var url = $"https://httpstat.us/{200}";
21+
var url = $"https://httpbin.org/status/{200}";
1922

23+
var now = DateTime.Now;
2024
var foo = "foo";
2125
foo.StartsWith("f");
2226
foo.Contains("o");

src/profiled-aot/dotnet.aotprofile

-8.62 KB
Binary file not shown.

0 commit comments

Comments
 (0)