o
    ȭRhY                     @   s   d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddddd	id
Z
e Ze Ze Ze	e
Zdd Zdd ZedkrmddlmZ e Zede ede eddd  eddd  eddd  dS dS )zN
A benchmark which tries to compare the possible slow subparts of validation.
    )Registry)DRAFT202012)HashTrieMapHashTrieSet)Draft202012Validatorarray   typeinteger)r	   	minLength	maxLengthitemsc                   C   s   t ddtdfS )Nfoobar)hmapinserthset r   r   e/home/air/sanwanet/backup_V2/venv/lib/python3.10/site-packages/jsonschema/benchmarks/subcomponents.pyregistry_data_structures   s   r   c                  C   s   t t} tjd| dS )Nzurn:example)uriresource)r   create_resourceschemaregistrywith_resource)r   r   r   r   registry_add   s   
r   __main__)RunnerzHashMap/HashSet insertionzRegistry insertionSuccessc                   C      t dgS )Nr   vis_validr   r   r   r   <lambda>(       r$   Failurec                   C   r    )Nr   r!   r   r   r   r   r$   )   r%   zMetaschema validationc                   C   s
   t tS )N)r"   check_schemar   r   r   r   r   r$   *   s   
 N)__doc__referencingr   referencing.jsonschemar   rpdsr   r   
jsonschemar   r   r   r   r   r"   r   r   __name__pyperfr   runner
bench_funcr   r   r   r   <module>   s2    