0

I have a .NET application that is using the Microsoft.TeamFoundationServer.Client package to get data from TFS server.

When I run my app in Visual Studio 2017 I see the following information in the Output console:

Web method running: [http://mytfsserver/tfs/Site/_apis/git/repositories/<repoId>/items?scopePath=%2FMobile.AuthenticationService%2FMobile.AuthenticationService.Tests%2F&recursionLevel=Full&download=False&version=Release] (GET)items[git]
Web method response: [http://mytfsserver/tfs/Site/_apis/git/repositories/<repoid>/items?scopePath=%2FMobile.AuthenticationService%2FMobile.AuthenticationService.Tests%2F&recursionLevel=Full&download=False&version=Release] (GET)items[git] 206 ms

I'm trying to troubleshoot a performance issue where my same app in the server takes twice the time to execute a report than locally and would like to capture the request response times as shown at the end of the second response debug message.

Is there a way to capture those debug lines programmatically? I know I can use fiddler but I don't think i have permissions to install it in my web server.

Here is a link of existing VSTS REST API debug output behavior: https://developercommunity.visualstudio.com/content/problem/263288/please-optionally-remove-web-method-running-and-we.html

Here is a sample call that would result in such output:

var changeset = versionControlServer.ArtifactProvider.GetChangeset(new Uri(externalLink.LinkedArtifactUri));
Adolfo Perez
  • 2,834
  • 4
  • 41
  • 61
  • What about using a timer, as demonstrated in this post [Check Response Time with httpwebrequest](https://stackoverflow.com/questions/7893897/check-response-time-with-httpwebrequest)? – GED125 Jun 13 '18 at 16:02
  • The problem is that the TFS api is making the requests internally. Those debug lines come from inside the library. I'm thinking about using a Trace listener like this https://stackoverflow.com/questions/1159755/where-does-system-diagnostics-debug-write-output-appear – Adolfo Perez Jun 13 '18 at 16:05
  • Without looking at the code it's hard to understand, but couldn't you start the timer before handing off to the API and then stop it once the response is received? – GED125 Jun 13 '18 at 16:07
  • I put a sample request in my original post. I could try wrapping my calls in a timer. Thanks for the suggestion – Adolfo Perez Jun 13 '18 at 16:11
  • Just try the Diagnostics Tools - `Network ` tool in VS, see [this blog](https://blogs.msdn.microsoft.com/visualstudio/2015/05/04/introducing-visual-studios-network-tool/) for details. Hope that helps. – Andy Li-MSFT Jun 14 '18 at 08:27
  • @AdolfoPerez Have you resolved the issue? any update? – Andy Li-MSFT Jun 26 '18 at 02:27

0 Answers0