
    ug]                     @    d dl mZ d dlZd dlmZ d dlmZ deddfdZy)    )ListN)	ServerAPI)
Collectionclientreturnc                    | j                          d}d}d}| j                         j                  rddd}nyd}g }t        |      D ])  }| j	                  d| |      }|j                  |       + t        j                  j                  ||      j                         }t        |      D cg c]  }d| 	 }	}t        |      D ]  }||   j                  |	|        yc c}w )	zcTest that we can create a large number of collections and that the system
    # remains responsive.
   N   )zhnsw:batch_sizezhnsw:sync_thresholdi'  test_collection_)metadatatest_id_)resetget_settingsis_persistentrangecreate_collectionappendnprandomrandtolistadd)
r   NDr   num_collectionscollectionsinew_collectiondataidss
             _/var/www/openai/venv/lib/python3.12/site-packages/chromadb/test/stress/test_many_collections.pytest_many_collectionsr"      s     LLN
A
AH**'(C 	O$&K?#11qc" 2 
 	>* $ 99>>!Q&&(D#(8
,8aXaS>8C
,?#A3% $ -s   .C")	typingr   numpyr   chromadb.apir   chromadb.api.models.Collectionr   r"        r!   <module>r)      s$      " 5&) & &r(   