Changeset fb15af5


Ignore:
Timestamp:
Feb 23, 2021, 3:35:48 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
a06023f
Parents:
18a7594
Message:

Change how stats are printed to be more compressed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/stats.cfa

    r18a7594 rfb15af5  
    7979
    8080                if( flags & CFA_STATS_READY_Q ) {
    81                         double push_sur = (100.0 * ((double)ready.pick.push.success) / ready.pick.push.attempt);
    82                         double pop_sur  = (100.0 * ((double)ready.pick.pop .success) / ready.pick.pop .attempt);
    83 
    8481                        double push_len = ((double)ready.pick.push.attempt) / ready.pick.push.success;
    8582                        double pop_len  = ((double)ready.pick.pop .attempt) / ready.pick.pop .success;
    86 
    87                         double lpush_sur = (100.0 * ((double)ready.pick.push.lsuccess) / ready.pick.push.local);
    88                         double lpop_sur  = (100.0 * ((double)ready.pick.pop .lsuccess) / ready.pick.pop .local);
    8983
    9084                        double lpush_len = ((double)ready.pick.push.local) / ready.pick.push.lsuccess;
     
    9387                        __cfaabi_bits_print_safe( STDOUT_FILENO,
    9488                                "----- %s \"%s\" (%p) - Ready Q Stats -----\n"
    95                                 "- total threads run      : %'15" PRIu64 "\n"
    96                                 "- total threads scheduled: %'15" PRIu64 "\n"
    97                                 "- push average probe len : %'18.2lf, %'18.2lf%% (%'15" PRIu64 " attempts)\n"
    98                                 "- pop  average probe len : %'18.2lf, %'18.2lf%% (%'15" PRIu64 " attempts)\n"
    99                                 "- local push avg prb len : %'18.2lf, %'18.2lf%% (%'15" PRIu64 " attempts)\n"
    100                                 "- local pop  avg prb len : %'18.2lf, %'18.2lf%% (%'15" PRIu64 " attempts)\n"
    101                                 "- thread migrations      : %'15" PRIu64 "\n"
    102                                 "- Idle Sleep -\n"
    103                                 "-- halts                 : %'15" PRIu64 "\n"
    104                                 "-- cancelled halts       : %'15" PRIu64 "\n"
    105                                 "-- schedule wake         : %'15" PRIu64 "\n"
    106                                 "-- wake on exit          : %'15" PRIu64 "\n"
     89                                "- total threads  : %'15" PRIu64 "run, %'15" PRIu64 "schd (%'" PRIu64 "mig )\n"
     90                                "- push avg probe : %'3.2lf, %'3.2lfl (%'15" PRIu64 " attempts, %'15" PRIu64 " locals)\n"
     91                                "- pop  avg probe : %'3.2lf, %'3.2lf%% (%'15" PRIu64 " attempts, %'15" PRIu64 " locals)\n"
     92                                "- Idle Sleep     : %'15" PRIu64 "h, %'15" PRIu64 "c, %'15" PRIu64 "w, %'15" PRIu64 "e\n"
    10793                                "\n"
    10894                                , type, name, id
    10995                                , ready.pick.pop.success
    11096                                , ready.pick.push.success
    111                                 , push_len, push_sur, ready.pick.push.attempt
    112                                 , pop_len , pop_sur , ready.pick.pop .attempt
    113                                 , lpush_len, lpush_sur, ready.pick.push.local
    114                                 , lpop_len , lpop_sur , ready.pick.pop .local
    11597                                , ready.threads.migration
     98                                , push_len, lpush_len, ready.pick.push.attempt, ready.pick.push.local
     99                                , pop_len , lpop_len , ready.pick.pop .attempt, ready.pick.pop .local
    116100                                , ready.sleep.halts, ready.sleep.cancels, ready.sleep.wakes, ready.sleep.exits
    117101                        );
     
    131115                                __cfaabi_bits_print_safe( STDOUT_FILENO,
    132116                                        "----- %s \"%s\" (%p) - I/O Stats -----\n"
    133                                         "- total allocations      : %'15" PRIu64 "\n"
    134                                         "-     fast allocations   : %'15" PRIu64 " (%'18.2lf) \n"
    135                                         "-     fast enomem        : %'15" PRIu64 "\n"
    136                                         "-     slow allocations   : %'15" PRIu64 "\n"
    137                                         "-     revokes for alloc  : %'15" PRIu64 "\n"
    138                                         "-     blocks  for alloc  : %'15" PRIu64 "\n"
    139                                         "- total submits          : %'15" PRIu64 "\n"
    140                                         "-     fast submits       : %'15" PRIu64 " (%'18.2lf) \n"
    141                                         "-     slow submits       : %'15" PRIu64 "\n"
    142                                         "- flush external submits : %'15" PRIu64 "\n"
    143                                         "- io_uring_enter calls   : %'15" PRIu64 "\n"
    144                                         "-     submits            : %'15" PRIu64 " (%'18.2lf) \n"
    145                                         "-     completes          : %'15" PRIu64 " (%'18.2lf) \n"
    146                                         "-     blocking calls     : %'15" PRIu64 "\n"
    147                                         "- io_uring_enter EBUSYs  : %'15" PRIu64 "\n"
    148                                         "- poller sleeping        : %'15" PRIu64 "\n"
     117                                        "- total allocations : %'15" PRIu64 "f, %'" PRIu64 "s (%'2.2lff) \n"
     118                                        "-     failures      : %'" PRIu64 "oom, %'" PRIu64 "rvk, %'" PRIu64 "blk\n"
     119                                        "- total submits     : %'15" PRIu64 "f, %'15" PRIu64 "s (%'18.2lf) \n"
     120                                        "- flush external    : %'" PRIu64 "\n"
     121                                        "- io_uring_enter    : %'" PRIu64 " (%'" PRIu64 ", %'" PRIu64 " EBUSY)\n"
     122                                        "-     submits       : %'15" PRIu64 " (%'18.2lf) \n"
     123                                        "-     completes     : %'15" PRIu64 " (%'18.2lf) \n"
     124                                        "- poller sleeping   : %'" PRIu64 "\n"
    149125                                        "\n"
    150126                                        , type,  name, id
    151                                         , total_allocs
    152                                         , io.alloc.fast, avgfasta
    153                                         , io.alloc.fail
    154                                         , io.alloc.slow
    155                                         , io.alloc.revoke
    156                                         , io.alloc.block
    157                                         , total_submits
    158                                         , io.submit.fast, avgfasts
    159                                         , io.submit.slow
     127                                        , io.alloc.fast, io.alloc.slow, avgfasta
     128                                        , io.alloc.fail, io.alloc.revoke, io.alloc.block
     129                                        , io.submit.fast, io.submit.slow, avgfasts
    160130                                        , io.flush.external
    161                                         , io.calls.count
     131                                        , io.calls.count, io.calls.blocks, io.calls.errors.busy
    162132                                        , io.calls.submitted, avgsubs
    163133                                        , io.calls.completed, avgcomp
    164                                         , io.calls.blocks
    165                                         , io.calls.errors.busy
    166134                                        , io.poller.sleeps
    167135                                );
Note: See TracChangeset for help on using the changeset viewer.