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

Can we run profiler and export the profiler data while running benchmarks? #533

Open
Mukulareddy opened this issue Jun 10, 2024 · 0 comments

Comments

@Mukulareddy
Copy link

Hello,
I am trying to run profiler while running ann-benchmarks using the following code:
`from multiprocessing import freeze_support
import cProfile
import pstats
from ann_benchmarks.main import main
import yappi

if name == "main":
profiler = cProfile.Profile()
profiler.enable()

freeze_support()
main()  # The function that runs the benchmark

profiler.disable()
stats = pstats.Stats(profiler).sort_stats('cumtime')
stats.print_stats(10)  # Print top 10 results
stats.dump_stats('profile_results.prof')

Then run python run.py --dataset fashion-mnist-784-euclidean --algorithm milvus-ivfflat --runs 1`
I am able to get the profiler data. But i am not sure if this is the correct way to profile for Milvus.
It would be great if someone who have already done profiling for Milvus database share their opinion.

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