![](https://i.imgur.com/wQ4uohV.png) # **Complete guide to work with ASV in Zarr** ## Zarr Documentation: [Link](https://zarr.readthedocs.io/en/stable/) ## Asv Documentation: [Link](https://asv.readthedocs.io/en/stable/) ## **Steps:** 1. Fork the zarr-python repository from the [GitHub](https://github.com/zarr-developers/zarr-python) 2. Go to your own owned repositories and click on code and from the drop-down menu copy the code. ![](https://i.imgur.com/RYmg67t.png) 3. Create a new folder on your desktop and name it XYZ. ![](https://i.imgur.com/JocfhAH.png) 4. Now, open the terminal in the folder. ![](https://i.imgur.com/pWNQMTc.png) 5. After opening of the terminal write ==**git clone**== command and paste the copied code (as mentioned in the 2 point.) and press Enter. ![](https://i.imgur.com/RKPPHKH.png) 6. Now open the ==**XYZ**== folder and you have folder named **zarr-python**. ![](https://i.imgur.com/ILf4EMv.png) 7. Inside **zarr-python** create a new folder ==**Benchmark**== ![](https://i.imgur.com/T5rO4Oi.png) 8. Install Anaconda following the [link](https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html). 9. Open the ==**Benchmark's folder**== terminal and install conda and clicking ==**Y**== to proceed. ![](https://i.imgur.com/TjzYd9D.png) 10. Create a new environment inside the ==**Benchmark's folder**==. (**In this example i have named my environment as ==MYNEWENV==**) ![](https://i.imgur.com/Y3SkSXB.png) 11. To work inside the ==**MYNEWENV**== we need to activate our environment. We can activate our environment using the command **conda activate MYNEWENV.** 12. Since we are in our environment we now have to install ASV. ![](https://i.imgur.com/BnrfFd1.png) ==NOTE: While installing ASV using the ***pip*** there comes an error which says pip command not found then you have to install pip inside the environment using the ***conda install pip*** command and then then pip install asv will run.==![](https://i.imgur.com/3iKk7va.png) 13. After successfully installing asv in the environment you have to start interacting with the asv. We now have to setup the new benchmarking project. **For further deatiled help you can visit this [link.](https://asv.readthedocs.io/en/stable/using.html) ![](https://i.imgur.com/aV06AEa.png)** ==NOTE: We are doing all of this in our environment.== 14. Now if we go back to our ==**Benchmark folder**== we can see the **asv.conf.json** file. ![](https://i.imgur.com/SkZLDtw.png) 15. Next step would be to edit the **asv.conf.json** file as per the requirements for the Zarr. ![](https://i.imgur.com/HaCCqov.png) ![](https://i.imgur.com/cyGinEW.png) ![](https://i.imgur.com/pEJvp0A.png) ==Note: If you want to explore further about how to edit the asv.conf.json file you can visit the [link.](https://asv.readthedocs.io/en/stable/using.html)== 16. Once you are done with the **step 15**, open the terminal in the benchmark folder. ![](https://i.imgur.com/EeInYWZ.png) 17. After opening the terminal in the benchmark folder activate your environment (refer to Step 10). ![](https://i.imgur.com/pZ8Fg5p.png) 18. Now to we have to check whether the asv is running successfully or not. ![](https://i.imgur.com/nAwLZEG.png) ==Note: If you want to know more the about asv commands you can click [here.](https://asv.readthedocs.io/en/stable/commands.html)== 19. After your benchmarks are running successfully we can write our benchmarks in the seperate file (I have done it in VS Code) and later put the code file in the Benchmark's benchmarks folder as you can see. (Notice that there is a difference between Benchmark and benchmarks.) ![](https://i.imgur.com/SkZLDtw.png) 20. Now when you have put your ==.py== file in the benchmarks folder we will run the command ==**asv run --quick**== to check whether our benchmarks are running or not. If yes, we are all set to get our results in the next step. ![](https://i.imgur.com/qNL02SW.png) ==Note: Always remember we are doing all of this being in our environment.== 21. After our benchmarks are running successfully we are all ready to see our results in the form of the graphs. We will use the ==asv publish== and ==asv preview== command to see our graphs. ![](https://i.imgur.com/YpBxvP9.png) 22. After we are done with the ==asv publish== we will write ==asv preview== command. ![](https://i.imgur.com/EMUPGK2.png) ==Note: **asv publish** collate all results into a website and **asv preview** helps us to preview the results using a local web server.== 23. We now have to copy the local web server and paste it in our web browser. ![](https://i.imgur.com/fQQfhRU.png) 24. We now have our desired result. ![](https://i.imgur.com/SVSbnLv.png) **To read more about the functioning of the asv click [here.](https://asv.readthedocs.io/en/stable/)**