Ignore:
Timestamp:
Mar 1, 2006 8:47:39 PM (18 years ago)
Author:
bennylp
Message:

Trying to find out why CPU is idle while it should be working hard!!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsip-perf/main.c

    r254 r257  
    367367        elapsed = sess_elapsed = batch->end_time; 
    368368 
     369        /* Batch time. */ 
    369370        PJ_TIME_VAL_SUB(elapsed, batch->start_time); 
    370         PJ_TIME_VAL_SUB(sess_elapsed, settings.session->start_time); 
    371371        msec = PJ_TIME_VAL_MSEC(elapsed); 
    372372        if (msec == 0) msec = 1; 
    373373 
    374         PJ_LOG(3,(THIS_FILE, "%02d:%02d:%02d: %d tasks in %d.%ds (%d tasks/sec)", 
     374        /* Session time */ 
     375        PJ_TIME_VAL_SUB(sess_elapsed, settings.session->start_time); 
     376 
     377        /* Spawn time */ 
     378        PJ_TIME_VAL_SUB(batch->spawned_time, batch->start_time); 
     379 
     380        PJ_LOG(3,(THIS_FILE, "%02d:%02d:%02d: %d tasks in %d.%ds (%d tasks/sec), " 
     381                             "spawn=time=%d.%d", 
    375382                             (sess_elapsed.sec / 3600), 
    376383                             (sess_elapsed.sec % 3600) / 60, 
     
    378385                             batch->rate, 
    379386                             elapsed.sec, elapsed.msec, 
    380                              batch->rate * 1000 / msec)); 
     387                             batch->rate * 1000 / msec, 
     388                             batch->spawned_time.sec, 
     389                             batch->spawned_time.msec)); 
    381390 
    382391        if (!settings.session->stopping) { 
     
    408417    pj_status_t status = PJ_SUCCESS; 
    409418    pjsip_cred_info cred_info[1]; 
    410     pj_time_val now, spawn_time, sess_time; 
    411419 
    412420    unsigned i; 
     
    424432    batch->success = 0; 
    425433    batch->failed = 0; 
     434    pj_gettimeofday(&batch->start_time); 
    426435 
    427436    pj_list_push_back(&sess->active_list, batch); 
     
    447456    } 
    448457 
    449     pj_gettimeofday(&now); 
    450     spawn_time = sess_time = now; 
    451     PJ_TIME_VAL_SUB(spawn_time, batch->start_time); 
    452     PJ_TIME_VAL_SUB(sess_time, sess->start_time); 
     458    pj_gettimeofday(&batch->spawned_time); 
    453459 
    454460    sess->total_created += batch->started; 
Note: See TracChangeset for help on using the changeset viewer.