MCPcopy Create free account
hub / github.com/SIPp/sipp / initRtt

Method initRtt

src/stat.cpp:371–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369
370
371void CStat::initRtt(const char* P_name, const char* P_extension,
372 unsigned long P_report_freq_dumpRtt)
373{
374 int sizeOf, sizeOfExtension;
375
376 if(P_name != nullptr) {
377 sizeOf = strlen(P_name) ;
378 if(sizeOf > 0) {
379 // 4 for '_rtt' and 6 for pid
380 sizeOf += 10 ;
381 sizeOfExtension = strlen(P_extension);
382 if(M_fileNameRtt != nullptr)
383 delete [] M_fileNameRtt;
384 sizeOf += sizeOfExtension;
385 M_fileNameRtt = new char[sizeOf+1];
386 sprintf (M_fileNameRtt, "%s_%ld_rtt%s", P_name, (long) getpid(),P_extension);
387 } else {
388 std::cerr << "new file name length is null - "
389 << "keeping the default filename : "
390 << DEFAULT_FILE_NAME << std::endl;
391 }
392 } else {
393 std::cerr << "new file name is NULL ! - keeping the default filename : "
394 << DEFAULT_FILE_NAME << std::endl;
395 }
396
397 // initiate the table dump response time
398 M_report_freq_dumpRtt = P_report_freq_dumpRtt ;
399
400 M_dumpRespTime = new T_value_rtt [P_report_freq_dumpRtt] ;
401
402 for (unsigned L_i = 0 ; L_i < P_report_freq_dumpRtt; L_i ++) {
403 M_dumpRespTime[L_i].date = 0.0;
404 M_dumpRespTime[L_i].rtd_no = 0;
405 M_dumpRespTime[L_i].rtt = 0.0;
406 }
407}
408
409void CStat::setRepartitionCallLength(char * P_listeStr)
410{

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected