New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReBenchLog
gauge adapter doesn't work on case-sensitive filesystems
#199
Comments
Wonder if this can easily be made case-insensitive? |
My reading of https://python.readthedocs.io/en/latest/library/importlib.html and https://peps.python.org/pep-0235/ is that Python is a case-sensitive language, and I didn't see any option to use case insensitive semantics for the import. So, I fear that's a documentation bug. 🙁 |
Hmm. I imagine it could be done with some string checking machinery, a masterlist of strings to gauge formats (instead of importing dynamically). Is that worthwhile, or should I amend the docs and add a help message for when Python gets an invalid gauge adapter? |
Hm, right. We could intercept well known names, check them case insensitive, and map them to the corresponding and correctly cased name. Perhaps there's even no need for the dynamic import. Give that rather suboptimal situation, we could try something like looking for gauge adapters on the disk, and then check case insensitively whether the names match, and use the file name we found on the disk for import. |
And, yeah, one could possibly indeed drop the dynamic import altogether until someone actually asks for it. |
It wasn't immediately apparent how to make gauge adapter resolution case insensitive (it's done by attempting to import packages until one hits, not comparing strings/filenames), so I amended some docs and added a more useful error message on failure in #200 . |
Now implemented as case-insensitive with #202. |
ReBench's custom benchmark log format is defined in interop/rebench_log_adapter.py, in the class
RebenchLogAdapter
. The correspondingbenchmark_suites.${benchmark}.gauge_adapter
value is defined in executor.py:ReBench/rebench/executor.py
Lines 446 to 449 in 08c736b
So the correct value is
RebenchLog
. However, the documentation and code referenceReBenchLog
a number of times. On my Linux-based system, that fails to find the gauge adapter. I hazard that it would work on Windows (but probably not MacOS?).In particular,
docs/extensions.md
states the wrong value.ReBench/docs/extensions.md
Lines 8 to 17 in 08c736b
The text was updated successfully, but these errors were encountered: