Archived issue #0029349
Foundation Classes, OSD_Timer - add missing theThisThreadOnly constructor option available in OSD_Chronometer
Description
OSD_Timer constructor does not provide options for initializing OSD_Chronometer, making it stuck on measuring whole process CPU time, which makes OSD_Chronometer within OSD_Timer instance a useless burden in case if thread-only time should be measured instead.
Steps to reproduce
N/A
Public activity
10 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Nov 28 08:42:40 2017 +0300
0029349: Foundation Classes, OSD_Timer - add missing theThisThreadOnly constructor option available in OSD_Chronometer
OSD_Timer constructor now has theThisThreadOnly option passed to OSD_Chronometer,
which is FALSE by default.
OSD_Chronometer now provides methods ::UserTimeCPU(), ::SystemTimeCPU() allowing
to fetch CPU times without akward syntax through overloaded ::Show().
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Nov 28 08:42:40 2017 +0300
0029349: Foundation Classes, OSD_Timer - add missing theThisThreadOnly constructor option available in OSD_Chronometer
OSD_Timer constructor now has theThisThreadOnly option passed to OSD_Chronometer,
which is FALSE by default.
OSD_Chronometer now provides methods ::UserTimeCPU(), ::SystemTimeCPU() allowing
to fetch CPU times without akward syntax through overloaded ::Show().
Patch is ready for review.
Some remarks:
1. OSD_Chronometer::timeToHoursMinutesSeconds() is public but starts with lower case -- should be either private or starting with uppercase
2. Method timeToHoursMinutesSeconds() is defined in OSD_Chronometer but used only in OSD_Timer; please move closer to location where it is used. Do we need it to be public at all?
3. Method OSD_Chronometer::Show (Standard_OStream& os) could be refactored to call Show(Standard_Real& theUserSec, Standard_Real& theSystemSec) to avoid code duplication for querying time
4. I see no reason to move implementation of the latter method Show() to header -- it is better to keep it in CXX
1. OSD_Chronometer::timeToHoursMinutesSeconds() is public but starts with lower case -- should be either private or starting with uppercase
2. Method timeToHoursMinutesSeconds() is defined in OSD_Chronometer but used only in OSD_Timer; please move closer to location where it is used. Do we need it to be public at all?
3. Method OSD_Chronometer::Show (Standard_OStream& os) could be refactored to call Show(Standard_Real& theUserSec, Standard_Real& theSystemSec) to avoid code duplication for querying time
4. I see no reason to move implementation of the latter method Show() to header -- it is better to keep it in CXX
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Nov 28 08:42:40 2017 +0300
0029349: Foundation Classes, OSD_Timer - add missing theThisThreadOnly constructor option available in OSD_Chronometer
OSD_Timer constructor now has theThisThreadOnly option passed to OSD_Chronometer,
which is FALSE by default.
OSD_Chronometer now provides methods ::UserTimeCPU(), ::SystemTimeCPU() allowing
to fetch CPU times without akward syntax through overloaded ::Show().
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Nov 28 08:42:40 2017 +0300
0029349: Foundation Classes, OSD_Timer - add missing theThisThreadOnly constructor option available in OSD_Chronometer
OSD_Timer constructor now has theThisThreadOnly option passed to OSD_Chronometer,
which is FALSE by default.
OSD_Chronometer now provides methods ::UserTimeCPU(), ::SystemTimeCPU() allowing
to fetch CPU times without akward syntax through overloaded ::Show().
No remarks, please test
Combination -
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian70-64:
OCCT
Total CPU difference: 20046.18000000047 / 19837.270000000357 [+1.05%]
Products
Total CPU difference: 8020.620000000084 / 8039.350000000084 [-0.23%]
Windows-64-VC10:
OCCT
Total CPU difference: 17896.34111939866 / 17832.614710898575 [+0.36%]
Products
Total CPU difference: 8019.57460719996 / 8019.621407499985 [-0.00%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian70-64:
OCCT
Total CPU difference: 20046.18000000047 / 19837.270000000357 [+1.05%]
Products
Total CPU difference: 8020.620000000084 / 8039.350000000084 [-0.23%]
Windows-64-VC10:
OCCT
Total CPU difference: 17896.34111939866 / 17832.614710898575 [+0.36%]
Products
Total CPU difference: 8019.57460719996 / 8019.621407499985 [-0.00%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]