o
    g]                     @   sB   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dZdS )	    )ListN)	ServerAPI)
Collectionclientreturnc           
      C   s   |    d}d}d}|  jrddd}ndS d}g }t|D ]}| jd| |d}|| qtj||	 }dd	 t|D }	t|D ]
}|| 
|	| qGdS )
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_)metadatac                 S   s   g | ]}d | qS )test_id_ ).0ir   r   a/var/www/visachat/venv/lib/python3.10/site-packages/chromadb/test/stress/test_many_collections.py
<listcomp>#   s    z)test_many_collections.<locals>.<listcomp>)resetget_settingsis_persistentrangecreate_collectionappendnprandomrandtolistadd)
r   NDr
   num_collectionscollectionsr   new_collectiondataidsr   r   r   test_many_collections   s(   
r#   )	typingr   numpyr   chromadb.apir   chromadb.api.models.Collectionr   r#   r   r   r   r   <module>   s
    