Skip to content

Fix padding of entries in .prof files

When the number of entries of a cost centre reaches 11 digits, it takes up the whole space reserved for it and the prof file ends up looking like:

... no.        entries  %time %alloc   %time %alloc

    ...
... 120918     978250    0.0    0.0     0.0    0.0
... 118891          0    0.0    0.0    73.3   80.8
... 11890229702412351    8.9   13.5    73.3   80.8
... 118903  153799689    0.0    0.1     0.0    0.1
    ...

This results in tooling not being able to parse the .prof file. I realise we have the JSON output as well now, but still it'd be good to fix this little weirdness.

This also fixes the right-alignment in the table, which was currently off-by-one, and I'm not sure if that was ever intended.

Original bug report and full prof file can be seen here: https://github.com/jaspervdj/profiteur/issues/28.

Merge request reports