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

  • SEARCH
  • Home
  • 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 7628073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:32:48+00:00 2026-05-31T05:32:48+00:00

When using dotTrace, I have to pick a profiling mode and a time measurement

  • 0

When using dotTrace, I have to pick a profiling mode and a time measurement method. Profiling modes are:

  • Tracing
  • Line-by-line
  • Sampling

And time measurement methods are:

  • Wall time (performance counter)
  • Thread time
  • Wall time (CPU instruction)

Tracing and line-by-line can’t use thread time measurement. But that still leaves me with seven different combinations to try. I’ve now read the dotTrace help pages on these well over a dozen times, and I remain no more knowledgeable than I started out about which one to pick.

I’m working on a WPF app that reads Word docs, extracts all the paragraphs and styles, and then loops through that extracted content to pick out document sections. I’m trying to optimize this process. (Currently it takes well over an hour to complete, so I’m trying to profile it for a given length of time rather than until it finishes.)

Which profiling and time measurement types would give me the best results? Or if the answer is “It depends”, then what does it depend on? What are the pros and cons of a given profiling mode or time measurement method?

  • 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-05-31T05:32:48+00:00Added an answer on May 31, 2026 at 5:32 am

    Profiling types:

    • Sampling: fastest but least accurate profiling-type, minimum profiler overhead. Essentially equivalent to pausing the program many times a second and viewing the stacktrace; thus the number of calls per method is approximate. Still useful for identifying performance bottlenecks at the method-level.

      Snapshots captured in sampling mode occupy a lot less space on disk (I’d say 5-6 less space.)
      Use for initial assessment or when profiling a long-running application (which sounds like your case.)

    • Tracing: Records the duration taken for each method. App under profiling runs slower but in return, dotTrace shows exact number of calls of each function, and function timing info is more accurate. This is good for diving into details of a problem at the method-level.

    • Line-by-line: Profiles the program on a per-line basis. Largest resource hog but most fine-grained profiling results. Slows the program way down. The preferred tactic here is to initially profile using another type, and then hand-pick functions for line-by-line profiling.


    As for meter kinds, I think they are described quite well in Getting started with dotTrace Performance by the great Hadi Hariri.

    Wall time (CPU Instruction): This is the simplest and fastest way to measure wall time (that is, the
    time we observe on a wall clock). However, on some older multi-core processors this may produce
    incorrect results due to the cores timers being desynchronized. If this is the case, it is recommended
    to use Performance Counter.

    Wall time (Performance Counter): Performance counters is part of the Windows API and it allows
    taking time samples in a hardware-independent way. However, being an API call, every measure takes
    substantial time and therefore has an impact on the profiled application.

    Thread time: In a multi-threaded application concurrent threads contribute to each other’s wall time.
    To avoid such interference we can use thread time meter which makes system API calls to get the
    amount of time given by the OS scheduler to the thread. The downsides are that taking thread time
    samples is much slower than using CPU counter and the precision is also limited by the size of
    quantum used by thread scheduler (normally 10ms). This mode is only supported when the Profiling
    Type is set to Sampling

    However they don’t differ too much.


    I’m not a wizard in profiling myself but in your case I’d start with sampling to get a list of functions that take ridiculously long to execute, and then I’d mark them for line-by-line profiling.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using JetBrains ' dotTrace . What other profiling tools can be recommended
I use DotTrace 4.5 performance time in release mode: 2400000000 Basic: 00:00:08.8051103 2400000000 Five:
I am using JetBrains dotTrace, I've profiled my app which is entirely CPU bound
Using C# for ASP.NET and MOSS development, we often have to embed JavaScript into
Using mercurial, I've run into an odd problem where a line from one committer
Using MVC2 I have an AJAX form which is posting to a bound model.
Using online interfaces to a version control system is a nice way to have
Using report builder 3.0, I have a report that queries a cube. How do
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Using restlet, I want to make a post to android's c2dm service. I have

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.