cProcProfiler Class

Your main interaction with the profiler is through this class. The Usage column indicates the type of profiling session in which you are likely to need to access a particular property or method.

Public Methods

Usage Name ReturnsArgument(s) Summary
 Advanced StartProfiler none StartProfiler(sname As String, Optional pLevel As ptLevels = ptLevelAll)Create required objects and start a profiling session. Will be called automatically if you use procProfilerConstruct instead of creating your own cProfileTimer
 Always FinishProfiler none FinishProfilerFinish profiling session
 Advanced DestroyTimers none noneCleans up at end of a  Profiling session after reporting the results. Will be called automatically if you use procProfilerDestroy.
 Always Start
 Start (Section As String, Optional ProcName As String = "Not given", Optional pLevel As ptLevels = ptLevelLow)
Marks Start of a timing section
 Always Finish none Finish(Section As String)Marks finish of a timing section
 Sometimes Pause none Pause(Section as String)Marks the beginning of some code within a section that should be excluded from the total timing for that section, until the section is restarted with the Start method.
 Always Results none Results (rOutput as Range)Creates a table of profiling results starting at rOutput, which should reference a valid range in your workbook. 

Public Properties

Usage Name TypeSummary
 Advanced Timersreadonly collection of cProcTimers Timing information on each Section
 Advanced Created readonly Date When thiis cProcTimer was first created

You want to learn Google Apps Script?

Learning Apps Script, (and transitioning from VBA) are covered comprehensively in my my book, Going Gas - from VBA to Apps script, All formats are available from O'ReillyAmazon and all good bookshops. You can also read a preview on O'Reilly

If you prefer Video style learning I also have two courses available. also published by O'Reilly.
Google Apps Script for Developers and Google Apps Script for Beginners.

For help and more information join our forumfollow the blogfollow me on twitter