#include <CdbBdbObjectProfiler.hh>
Public Member Functions | |
| CdbBdbObjectProfiler (CdbBdbObjectProfilerUserAction *theUserAction, bool verboseMode=false, bool debugMode=false) | |
| Normal constructor. | |
| virtual | ~CdbBdbObjectProfiler () |
| Destructor. | |
| bool | profile (const ooHandle(ooObj)&theInputH) |
| Visit the specified object. | |
| CdbBdbObjectProfilerUserAction * | setUserAction (CdbBdbObjectProfilerUserAction *theUserAction) |
| Set user action. | |
| uint64 | getSize () const |
| Get current size. | |
| uint64 | getTopObjects () const |
| Get current number of top-level objects. | |
This facility uses the Objectivity/DB Active Schema API to navigate accross an arbitrary graph of objects by visiting and profiling (collecting the object's size satistic information for each node) and calling a user defined action at each node. Each node is visited/profiled just once. A user defined action object provides a feedback wether the profiling should propagate beyond a profiled node or it should stop at this node or it should break profiling due to a error.
IMPLEMENTATION NOTES:
(1) This class uses PIMPL idiom to protect end users of the class from being exposed to the buggy header files of the Objectivity/DB Active Schema API.
(2) This class violates CDB API convention on the inclusion of "CdbBase/CdbCommon.hh" header file to avoid STD namespace conflicts of the kind described above.
ATTENTION:
Definition at line 40 of file CdbBdbObjectProfiler.hh.
|
||||||||||||||||
|
Normal constructor. Sets the initial context for the profiling. This context can be reused accross multiple calls to the profiling method itself. A non-zero pointer onto a user defined action is required. The ownership to a user action does not get transferred into the current object. We may need non-const pointer to let a user to maintain the context of user action between calls. Note, a user action object can be overriden by passing another user action object by calling a special "setUserAction" method. Definition at line 15 of file CdbBdbObjectProfiler.cc. |
|
|
Destructor. More details... Definition at line 23 of file CdbBdbObjectProfiler.cc. |
|
|
Get current size. This method will return the number of bytes found by the profiler by the time of the current request get executed. Definition at line 42 of file CdbBdbObjectProfiler.cc. References CdbBdbObjectProfilerImpl::getSize(). |
|
|
Get current number of top-level objects. This method will return the number of "top-level" objects (not counting duplicated ones) processed by the profiler by the time of the current request get executed. NOTES:
Definition at line 48 of file CdbBdbObjectProfiler.cc. References CdbBdbObjectProfilerImpl::getTopObjects(). |
|
|
Visit the specified object. The operation will return "true" in case of success, it will return "false" in case of any errors. Definition at line 30 of file CdbBdbObjectProfiler.cc. References CdbBdbObjectProfilerImpl::profile(). |
|
|
Set user action. If 0 pointer is passed then the current user action will be reset and it will not be called anymore. The method will return a pointer onto the previous action (if any).
Definition at line 36 of file CdbBdbObjectProfiler.cc. References CdbBdbObjectProfilerImpl::setUserAction(). |
1.3-rc3