Changeset f4b83cc in mainline


Ignore:
Timestamp:
2017-12-27T18:26:06Z (7 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2e2af3a
Parents:
8e16454
Message:

tmon: change format string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tmon/burst_tests.c

    r8e16454 rf4b83cc  
    161161        // Format the size.
    162162        const double div_size = size / factor;
     163
    163164        char *out = NULL;
    164165        asprintf(&out, fmt, div_size, prefix);
     
    174175        printf(INDENT "Number of cycles: %d\n", params->cycles);
    175176
    176         char *str_size = format_size(params->size, "%0.3f %sB");
     177        char *str_size = format_size(params->size, "%.3f %sB");
    177178        printf(INDENT "Data size: %s\n", str_size);
    178179        free(str_size);
     
    188189
    189190        const double dur_per_cycle = (double) duration / (double) params->cycles;
    190         printf(INDENT "Duration per cycle: %0.3f ms\n", dur_per_cycle);
     191        printf(INDENT "Duration per cycle: %.3f ms\n", dur_per_cycle);
    191192
    192193        const size_t total_size = params->size * params->cycles;
    193         char *str_total_size = format_size(total_size, "%0.3f %sB");
     194        char *str_total_size = format_size(total_size, "%.3f %sB");
    194195        printf(INDENT "Total size: %s\n", str_total_size);
    195196        free(str_total_size);
    196197
    197198        const double speed = 1000.0 * (double) total_size / (double) duration;
    198         char *str_speed = format_size(speed, "%0.3f %sB/s");
     199        char *str_speed = format_size(speed, "%.3f %sB/s");
    199200        printf(INDENT "Average speed: %s\n", str_speed);
    200201        free(str_speed);
Note: See TracChangeset for help on using the changeset viewer.