Profiler utils with file-like object
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 6
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 1
Description
Suggestion for profiler utils:
a save_results that takes a file-like object would be useful from an API standpoint. It would allow for using in-memory StringIO, easier testing, and so on.
And then I believe print_results and save_results_to_file effectively then rely on the same underlying code (as sys.stdout, sys.stderr, and open() as fp are all output streams/file-like objects)
Originally posted by @klauer in https://github.com/pcdshub/pcdsutils/pull/53#pullrequestreview-977341220
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the profiler utilities and the existing save_results, print_results, and save_results_to_file entry points. Read how each currently handles output streams, then verify that a shared file-like-object path supports in-memory StringIO and preserves the existing stdout, stderr, and file behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100