Skip to content
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

Richbench does not work #4

Closed
bugb opened this issue Aug 6, 2023 · 1 comment
Closed

Richbench does not work #4

bugb opened this issue Aug 6, 2023 · 1 comment

Comments

@bugb
Copy link

bugb commented Aug 6, 2023

I am using Python 3.11 on Arch Linux and found the example work but my other function does not work. Here is my source code:

import logging

logging.basicConfig(filename='app.log', filemode='w', format='%(name)s - %(levelname)s - %(message)s')


def _log():
    for _ in range(10_000):
        logging.warning(_)

def _print():
    for _ in range(10_000):
        print(_)

__benchmarks__ = [
    (_log, _print, "Log >< Print"),
    (_print, _log, "Print >< Log")
]

Output:

image

@bugb
Copy link
Author

bugb commented Aug 6, 2023

Sorry I found the instruction here:

Benchmarks should be in a directory and must have the filename bench_{name}.py.

Closed!

@bugb bugb closed this as completed Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant