MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / Print

Method Print

SRC/utility/Timer.cpp:166–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164
165
166void
167Timer::Print(OPS_Stream &s) const
168{
169#ifdef TIMER_USE_MPIWTIME
170 s << "TIME(sec) Real: " << getReal() << endln;
171#else //TIMER_USE_MPIWTIME
172#ifdef _WIN32
173 // fill in later
174#else // Not _WIN32
175 long clktck = CLK_TCK;
176 double Real = (t2-t1)/(double) clktck;
177 double CPU = (tmsend.tms_utime - tmsstart.tms_utime)/(double) clktck;
178 double System = (tmsend.tms_stime - tmsstart.tms_stime)/(double) clktck;
179 s << endln;
180 s << "TIME(sec) Real: " << Real << " CPU: " << CPU;
181 s << " System: " << System << endln;
182
183 int r2no = r2us->ru_minflt;
184 int r2yes = r2us->ru_majflt;
185 int r1no = r1us->ru_minflt;
186 int r1yes = r1us->ru_majflt;
187 int r1page = r1no + r1yes;
188 int r2page = r2no + r2yes;
189
190 s << "PAGE FAULTS: " << r2page-r1page << " (NO i/o: ";
191 s << r2no-r1no << " YES i/o " << r2yes-r1yes << ") ";
192
193 r2no = r2us->ru_nivcsw;
194 r2yes = r2us->ru_nvcsw;
195 r1no = r1us->ru_nivcsw;
196 r1yes = r1us->ru_nvcsw;
197 r1page = r1no + r1yes;
198 r2page = r2no + r2yes;
199
200 s << "CONTEXT SWITCHES " << r2page-r1page << " (Invol: ";
201 s << r2no-r1no << " Voluntary " << r2yes-r1yes << ") ";
202
203 r2no = r2us->ru_nswap;
204 r1no = r1us->ru_nswap;
205 r2yes = r2us->ru_maxrss;
206
207 s << "Swapped: " << r2no-r1no << " Max Res Set Size: " << r2yes << endln;
208 s << endln;
209#endif //_WIN32
210#endif //TIMER_USE_MPIWTIME
211}
212
213OPS_Stream &operator<<(OPS_Stream &s, const Timer &E)
214{

Callers 9

OPS_printModelFunction · 0.45
printNodeFunction · 0.45
printElementFunction · 0.45
ops_printEleFunction · 0.45
ops_printNodeFunction · 0.45
ops_printAlgoFunction · 0.45
ops_printIntegFunction · 0.45
Timer.cppFile · 0.45
solveMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected