Changeset 274 for trunk/markup_stats.cxx


Ignore:
Timestamp:
Jul 6, 2009, 7:06:27 PM (10 years ago)
Author:
ksherdy
Message:

Report averages as floating point values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/markup_stats.cxx

    r265 r274  
    117117int last_buffer_rel_pos = 0;
    118118
     119#define CALC_AVG
    119120
    120121#ifdef LEAF_COUNTING
     
    189190        nesting_depth += 1;
    190191        if (nesting_depth > max_nesting_depth) max_nesting_depth = nesting_depth;
    191 //      cout << string((char *) item, lgth) << endl;
     192        //cout << string((char *) item, lgth) << endl;
    192193}
    193194
     
    331332                code_clocker->end_interval(buffer_rel_pos);
    332333        #endif
    333         printf("Document end\n");
     334        //printf("Document end\n");
    334335        //Parser_Interface<UTF_8>::model_info->ReportSymbolInfo();
    335336}
     
    368369        if (count == 0) printf("s.\n");\
    369370        else if (count == 1) printf(" of length %i.\n", total_lgth);\
    370         else printf("s of avg. lgth %i.\n", total_lgth/count);
     371        else printf("s of avg. lgth %f.\n", (double)total_lgth/(double)count);
    371372
    372373
     
    414415
    415416        #ifdef PAPI
    416                 #define NUM_EVENTS 2
    417                 int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_BR_MSP};
     417                #define NUM_EVENTS 1
     418                int Events[NUM_EVENTS] = {PAPI_TOT_CYC};
    418419//              int Events[NUM_EVENTS] = {PAPI_TOT_CYC, PAPI_L1_DCM};
    419420//              int Events[NUM_EVENTS] = {PAPI_L2_DCM};
     
    440441       
    441442        src_filesize = fileinfo.st_size;
    442        
    443         // close file
     443
    444444        fclose (src_file);
    445445       
     
    539539                code_clocker->write_xml_file();
    540540                code_clocker->display_system_info();
    541                 code_clocker->display_raw_event_data();
     541                //code_clocker->display_raw_event_data();
    542542                delete code_clocker;
    543543        #endif 
Note: See TracChangeset for help on using the changeset viewer.