Comments (9)
This should actually be split into two independent features:
(a) adhere to significant digits (i.e., we must not display digits that have no significance) and
(b) nicely align the numbers at the decimal point in the table columns.
The correct number of significant digits should be provided by the measurement engineer
(in the XML table definition).
I have implemented a preliminary version of these two features in functions
- format_number (reduce to significant digits) and
- format_number_align (alignment)
in util.py.
The perfect adjustment is only possible with the counting mentioned by Philipp.
But instead of the "maximum width" we need the "maximum number of digits after the decimal point",
for a correct alignment that works for all situations.
The current implementation works well for values larger than 0.1
(i.e., when the max number of digits after the decimal point coincides with the number of significant digits).
from benchexec.
The same assignment also needs to be done for the statistics lines at the bottom of the table.
from benchexec.
There is currently something wrong with at least some results, I have cases where values between 0 and 1 get rounded incorrectly to 0
. This is visible for example in the test case test_multi_table_xml_with_columns
in column SMT time (s)
.
Furthermore, it seems that statistics get computed only for the first set of results in a table (visible among others in the same test case).
from benchexec.
The two stated bugs should be fixed by commits 9bddbd8 and 769e9ea, sorry about them.
Another issue: How should the format of value 0 look like?
E.g.: Number of significant digits = 3, value = 0.0000
Should we display 0.00 or 0.0000?
from benchexec.
Good question. 0.00
would look more natural in general, while .000
would look more like the values nearby. There is still a mismatch with very small values like .00123
anyway though, thus I think we can go with 0.00
.
from benchexec.
The rounding is almost perfect now, except values like 0.070
get rounded to .07
instead of .070
.
Could you please add some unit tests for format_number
/format_value
?
from benchexec.
For columns of format count
, the average and stdev values in the summary tooltips of the footer now have too many digits. I think these can be rounded to 1 or 2 decimal places. If the user gave a number of significant digits for this column, this should be applied here as well, of course (just like it is already done for measure
columns).
from benchexec.
There also seem to be too many spaces on the right now for columns with small values, e.g. again in test case test_multi_table_xml_with_columns
in column SMT time (s)
.
from benchexec.
Thanks @leostrakosch, I could not find any remaining problem, thus I am closing this. Please still write some unit tests, and if you think the current code is worth to be refactored, feel free to do so.
from benchexec.
Related Issues (20)
- Detect and warn about system-wide OOMs
- Improve handling of nested mounts HOT 1
- Test and document usage in Podman containers HOT 1
- Support for milliseconds when setting time limit HOT 6
- Replacing numbers in statistic tex output doesn't work for all numbers HOT 4
- Process-termination logic of runexec not safe regarding frozen processes HOT 4
- containerexec fails to terminate container with frozen processes HOT 1
- Skip execution if required files missing? HOT 2
- Running just result determination on existing tool logfiles? HOT 2
- "Asymmetric machine architecture not supported" on Intel CPU with hybrid architecture HOT 5
- Support a core requirement per run that is different than the core limit HOT 3
- benchexec does not terminate when CTRL-c is pressed HOT 2
- New process architecture for benchexec in container mode
- Deb package from PPA not installable on Debian HOT 4
- Podman + Benchexec: Failed to configure container: [Errno 13] mount(None, b'/tmp/Benchexec_tool_info_container_b2xwyzw1', b'tmpfs', 0, b'size=100%') failed: Permission denied HOT 3
- How to specify the python interpreter path in benchexec? HOT 9
- Too many log lines from table-generator HOT 2
- Overlapping execution of run sets
- Improved CSV export - feedback welcome HOT 4
- Disable CSV export by default?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from benchexec.