Weird behaviour while testing our .NET 8 Web API

CodingDutchCodingDutch Posts: 7 Bronze 2
edited July 3, 2024 1:54PM in ANTS Performance Profiler
I just tested your newest .NET 8 compatible ANTS Performance Profiler but I noticed some strange things:

I am profiling a Web.API .NET 8 using Kestrel and chose the '.NET Core/ .NET 5+ application' profiling session.

Things I encountered:
1. Usually I have to start it a few times to get the correct performance graph. Sometimes it remains empty, sometimes it shows red vertical lines. See screenshot below.
2. My Web API runs normally (I check it with https://localhost:8000/swagger/index.html), but after doing some requests it fails to register SQL Calls (we use Entity Framework). And I have the option 'Enable SQL Query profiling' enabled.
3. I am trying to add the option 'ASPNETCORE_URLS' to the environment variables but it fails to be persisted. Although it maybe is not needed this option, it seems there is a problem with saving these.
4. Why are non of my controller classes in the call tree? I only see the ones in the attached screenshot. I also opened any of the hidden tree options but I can't find them. I mean code like:

public class SomeController : Controller 
{
   [HttpGet("something")]
    [ProducesResponseType(StatusCodes.Status200OK, Type = typeof(ICollection<SomethingResult>))]
    [SwaggerOperation(Summary = "Get the Somethings", Description = "Gets the list of Somethings")]
    public async Task<IActionResult> GetSomethings(CancellationToken cancellationToken)
    {
        return Json(await _somethingService.GetSomethingsAsync(cancellationToken));
    }
}

Empty graph in the middle (sometimes restart helps):


Missing controller methods (I also did a find 'controller' and openend every closed treeitem):


Tagged:

Answers

  • Hello CodingDutch, thank you for the question!

    All the behaviour you've described sounds like ANTS isn't correctly hooking the process, is it only this app on this machine you're seeing the behaviour with please?

    The fact it's inconsistent however is puzzling, we probably need to review the logs to identify why, I can create a support ticket to do so if you'd like?
    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?
  • CodingDutchCodingDutch Posts: 7 Bronze 2
    edited July 8, 2024 7:33AM
    Unfortunately I cannot easily make a copy of our project, but I tried with a competitive product and this profiles everything. Also SQL queries.

    Hopefully I am able later to create a small example app so this can be put on hold for now.
Sign In or Register to comment.