Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8073357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:19:07+00:00 2026-06-05T14:19:07+00:00

Iv wrote some C# code which seemed to be taking its sweet time, but

  • 0

Iv wrote some C# code which seemed to be taking its sweet time, but getting the job done. I then rewrote the code to a slightly faster version, although its not speedy (its a cms admin area function so not critical to the site)

Anyway it got me thinking if there are any tools/techniques out there that allow a/b testing for functions in asp.net/C#

I basically want to provide two functions, and get the execution times etc for each one.

Any one come across any tools for this?

Had a Google and looked on here but couldn’t find anything for benchmarking two functions

I guess I’m looking for jsPerf but in vs2010 and for C#

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:19:09+00:00Added an answer on June 5, 2026 at 2:19 pm

    You could either use ANTS Profiler http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/ (payable product but they have a Trial version) or some other Profiler product (ANTS, vTune, OptimizeIt, DevPartner, YourKit, dotTrace) on the market.

    You may also intstrument the functions by yourself by setting up some unit tests that execute those 2 functions using a manual StopWatch instrumentation to compare execution time (quicker and less expensive). Unit tests would also allow for assuring that you do not have any regressions on performance if you need to change the implementation later. http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx

            var stopWatch = new Stopwatch();
            stopWatch.Start();
            var result = CallFunction();
            stopWatch.Stop();
            var executionTime = stopWatch.Elapsed;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some time ago, I wrote some code to decide which method of updating mutable
I wrote some code which monitors the output of Stopwatch using a tight loop.
I have been refactoring throwaway code which I wrote some years ago in a
So, I wrote a code which uses some Microsoft Sql server dlls, these dlls
I wrote a simple plugin which sets some css code using wp_options. It all
i wrote a little addin, which does some formatting of my C# code. in
As been requested, I wrote some code which basically change the document's date (the
I wrote some C++ code in which I used Templates. Since I used templates,
I wrote some test code like this which compiled and worked fine... void threadtest()
I have some code which seems unambiguous to me, but gcc4.7 is choking on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.