VMS/VMS_Implementations/SSR_impls/SSR__MC_shared_impl

view SSR_Measurement.h @ 84:ce07f1a42ddf

Added skeleton for data tracking assigner + design notes
author Sean Halle <seanhalle@yahoo.com>
date Thu, 10 Jan 2013 11:16:42 -0800
parents b5b5323b4177
children
line source
1 /*
2 * Copyright 2009 OpenSourceResearchInstitute.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 */
9 #ifndef _SSR_MEAS_H
10 #define _SSR_MEAS_H
13 #ifdef MEAS__TURN_ON_LANG_MEAS
15 #ifdef MEAS__Make_Meas_Hists_for_Language
16 #undef MEAS__Make_Meas_Hists_for_Language
17 #endif
20 //=================== Language-specific Measurement Stuff ===================
21 //
22 //
23 #define SendFromToHistIdx 1 //note: starts at 1
24 #define SendOfTypeHistIdx 2
25 #define ReceiveFromToHistIdx 3
26 #define ReceiveOfTypeHistIdx 4
28 #define MEAS__Make_Meas_Hists_for_Language \
29 _VMSMasterEnv->measHistsInfo = \
30 makePrivDynArrayOfSize( (void***)&(_VMSMasterEnv->measHists), 200); \
31 makeAMeasHist( SendFromToHistIdx, "SendFromTo", 50, 0, 100 ) \
32 makeAMeasHist( SendOfTypeHistIdx, "SendOfType", 50, 0, 100 ) \
33 makeAMeasHist( ReceiveFromToHistIdx,"ReceiveFromTo", 50, 0, 100 ) \
34 makeAMeasHist( ReceiveOfTypeHistIdx,"ReceiveOfType", 50, 0, 100 )
36 #define Meas_startSendFromTo \
37 int32 startStamp, endStamp; \
38 saveLowTimeStampCountInto( startStamp ); \
40 #define Meas_endSendFromTo \
41 saveLowTimeStampCountInto( endStamp ); \
42 addIntervalToHist( startStamp, endStamp, \
43 _VMSMasterEnv->measHists[ SendFromToHistIdx ] );
45 #define Meas_startSendOfType \
46 int32 startStamp, endStamp; \
47 saveLowTimeStampCountInto( startStamp ); \
49 #define Meas_endSendOfType \
50 saveLowTimeStampCountInto( endStamp ); \
51 addIntervalToHist( startStamp, endStamp, \
52 _VMSMasterEnv->measHists[ SendOfTypeHistIdx ] );
54 #define Meas_startReceiveFromTo \
55 int32 startStamp, endStamp; \
56 saveLowTimeStampCountInto( startStamp ); \
58 #define Meas_endReceiveFromTo \
59 saveLowTimeStampCountInto( endStamp ); \
60 addIntervalToHist( startStamp, endStamp, \
61 _VMSMasterEnv->measHists[ ReceiveFromToHistIdx ] );
63 #define Meas_startReceiveOfType \
64 int32 startStamp, endStamp; \
65 saveLowTimeStampCountInto( startStamp ); \
67 #define Meas_endReceiveOfType \
68 saveLowTimeStampCountInto( endStamp ); \
69 addIntervalToHist( startStamp, endStamp, \
70 _VMSMasterEnv->measHists[ReceiveOfTypeHistIdx ] );
72 #else //===================== turned off ==========================
74 #define MEAS__Make_Meas_Hists_for_Language
75 #define Meas_startSendFromTo
76 #define Meas_endSendFromTo
77 #define Meas_startSendOfType
78 #define Meas_endSendOfType
79 #define Meas_startReceiveFromTo
80 #define Meas_endReceiveFromTo
81 #define Meas_startReceiveOfType
82 #define Meas_endReceiveOfType
84 #endif /* MEAS__TURN_ON_LANG_MEAS */
86 #endif /* */