Python AIBenchmark
https://pypi.org/project/ai-benchmark/
Comparison Table
https://ai-benchmark.com/ranking_cpus_and_gpus_detailed.html
The proposed program
from ai_benchmark import AIBenchmark
benchmark = AIBenchmark()
results=benchmark.run()
crashes due to error
AttributeError: module 'numpy' has no attribute 'warnings'. Did you mean: 'hanning'?
workaround:
In source file
ai_benchmark/utils.py
change
import numpy as np
to
import warnings
import numpy as np
np.warnings = warnings
(Brave AI generated answer)
Note:
If ai_benchmark was installed with pip while a conda environment named test02 was active, the file is in
~/miniconda3/envs/test02/lib/python3.10/site-packages/ai_benchmark
Mandelbrot benchmark
Note: Brave AI
search Brave for "python measure time benchmark"
import time
start_time = time.monotonic()
# Your code here
print('seconds: ', time.monotonic() - start_time)
Brave AI response mentions line_profiler
from line_profiler import LineProfiler
def my_function():
# Your code here
lp = LineProfiler()
lp_wrapper = lp(my_function)
lp_wrapper()
lp.print_stats()
memory_profiler