It would be cool if some of this histogram wisdom (like how adding the
/FooTask filters) was up on our dev site somewhere.  I always forget
how to do filtering...

On Thu, Feb 26, 2009 at 11:02 AM, Jim Roskind <j...@chromium.org> wrote:
> If you're not chasing after performance and stats issues in the renderer,
> you can stop reading now.
> Thanks to the work by Raman Tenneti, the support for histograms that has
> been available in the Browser process, is now provided in the Renderer
> processes.  Histograms gathered in Renderers are automatically aggregated up
> into Browser process for viewing and/or UMA uploading.
> Typical complexities of usage is hidden in a macro that declares and reuses
> a static initializer (to make this code very fast, and aside from the first
> call creating the static, effectively thread safe).  A sample usage would
> be:
>
> #include "base/histogram.h"
> ...
>     base::TimeTicks start_time = base::TimeTicks::Now();
>     //  Do something, or some tasks, that take a while (few milliseconds??
> few minutes?)
>     HISTOGRAM_TIMES("YourGroup.TimeToDoFooTask", base::TimeTicks::Now() -
> start_time);
>
> You can then see all the histograms created in your Chromium run by
> visiting:
> about:histograms
> You'll probably see that there are a LOT already.  IF you want to see your
> specific histograms (only) look at:
> about:histograms/YourGroup
> or
> about:histograms/YourGroup.TimeToDoFooTask
> or
> about:histograms/FooTask
> etc.
>
> As one other example, if you were trying to count (for example) how many
> times something interesting happened in a page, you might use:
>     HISTOGRAM_COUNTS("YourGroup.GoobersPerPage", goober_count);
>
>
> Lastly, if you're just doing this for personal/private debugging
> development, please use the DHISTOGRAM_TIMES and DHISTOGRAM_COUNTS etc.
> macros, which are not compiled into the final release binary (moral
> equivalent of DCHECK vs CHECK).  Additional flavors are available for
> consideration in base/histogram.h
>
> Enjoy,
> Jim
>
> p.s., This should transparently work in single process mode as well.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to