Limit precice-profiling console output to 2 decimal places
Please describe the problem you are trying to solve.
This looks silly
eid | sum count mean
advance/m2n.receiveData | 2266.0 9 251.77777777777777
Describe the solution you propose.
Use formatting {:.2f} for floats and rely on --unit for details.
Describe alternatives you've considered
{:.1f} could also suffice, but may hide too much info.
hi can you describe a bit more ...about how to produce the issue ... i would love to work on this issue
@samarsrivastav sure.
We have a python script to analyse profiling data using polars. It uses a custom formatting function which we need to visually group information of ranks. https://github.com/precice/precice/blob/b743fec339746de4acf6581923f472ba4d98db5b/tools/profiling/precice-profiling#L71-L102
This needs some special treatment to handle formatting for floating point values differently.
We have more user information in our documentation. There are test input files which you can test the implementation with.
@uekerman Could you maybe upload the profiling.json which gives strange results?
sure, profiling.json
calling:
precice-profiling analyze Propagator
gives:
Reading events file profiling.json
Output timing are in us.
eid | sum count mean min max
_GLOBAL | 2967028.0 1 2967028.0 2967028.0 2967028.0
advance | 52787.0 10 5278.7 1999.0 8629.0
advance/m2n.receiveData | 1625.0 9 180.55555555555554 129.0 252.0
advance/map.rbf.mapData.FromGenerator-MeshToPropagator-Mesh | 26503.0 9 2944.777777777778 2362.0 5457.0
construction | 28041.0 1 28041.0 28041.0 28041.0
construction/configure | 27692.0 1 27692.0 27692.0 27692.0
construction/startProfilingBackend | 297.0 1 297.0 297.0 297.0
finalize | 688.0 1 688.0 688.0 688.0
initialize | 497852.0 1 497852.0 497852.0 497852.0
initialize/m2n.acceptPrimaryRankConnection.Generator | 1897.0 1 1897.0 1897.0 1897.0
initialize/m2n.acceptSecondaryRanksConnection | 49230.0 1 49230.0 49230.0 49230.0
initialize/m2n.broadcastVertexDistributions | 4.0 1 4.0 4.0 4.0
initialize/m2n.buildCommunicationMap | 233.0 1 233.0 233.0 233.0
initialize/m2n.createCommunications | 2726.0 1 2726.0 2726.0 2726.0
initialize/m2n.exchangeVertexDistribution | 45966.0 1 45966.0 45966.0 45966.0
initialize/m2n.receiveData | 206537.0 1 206537.0 206537.0 206537.0
initialize/map.rbf.computeMapping.FromGenerator-MeshToPropagator-Mesh | 184808.0 1 184808.0 184808.0 184808.0
initialize/map.rbf.mapData.FromGenerator-MeshToPropagator-Mesh | 2392.0 1 2392.0 2392.0 2392.0
initialize/partition.prepareMesh.Propagator-Mesh | 94.0 1 94.0 94.0 94.0
initialize/partition.receiveGlobalMesh.Generator-Mesh | 46992.0 1 46992.0 46992.0 46992.0
initialize/preprocess.Propagator-Mesh | 35.0 1 35.0 35.0 35.0
solver.advance | 2386616.0 11 216965.0909090909 37.0 492399.0
solver.initialize | 241.0 1 241.0 241.0 241.0