
    _j                     ^    d dl mZ d dlZd dlmZ d dlmZ d dlm	Z	 e	deddfd            Z
dS )	    )ListN)	ServerAPI)
Collection)multi_region_testclientreturnc                    |                                   d}d}d}|                                 j        rddd}ndS d}g }t          |          D ]1}|                     d| |          }|                    |           2t          j                            ||          	                                }d t          |          D             }	t          |          D ]}||         
                    |	|           dS )	zcTest that we can create a large number of collections and that the system
    # remains responsive.
   N   )zhnsw:batch_sizezhnsw:sync_thresholdiL  test_collection_)metadatac                     g | ]}d | S )test_id_ ).0is     g/var/www/FlaskApp/flask-venv/lib/python3.11/site-packages/chromadb/test/stress/test_many_collections.py
<listcomp>z)test_many_collections.<locals>.<listcomp>&   s    
,
,
,a>a>>
,
,
,    )resetget_settingsis_persistentrangecreate_collectionappendnprandomrandtolistadd)
r   NDr   num_collectionscollectionsr   new_collectiondataidss
             r   test_many_collectionsr(   	   s+    LLNNN
A
AH* '(CC 	 O$&K?## + +11"q"" 2 
 
 	>**** 9>>!Q&&((D
,
,588
,
,
,C?## & &A3%%%%& &r   )typingr   numpyr   chromadb.apir   chromadb.api.models.Collectionr   chromadb.test.conftestr   r(   r   r   r   <module>r.      s              " " " " " " 5 5 5 5 5 5 4 4 4 4 4 4 &) & & & & & & &r   