
    gY                     t   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 Zd Zedk(  rkddlmZ  e       Zej+                  de       ej+                  de       ej+                  dd        ej+                  dd        ej+                  dd        yy)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                  X    t         j                  dd      t        j                  d      fS )Nfoobar)hmapinserthset     X/var/www/openai/venv/lib/python3.12/site-packages/jsonschema/benchmarks/subcomponents.pyregistry_data_structuresr      s!    ;;ue$dkk%&888r   c                  b    t        j                  t              } t        j	                  d|       S )Nzurn:example)uriresource)r   create_resourceschemaregistrywith_resource)r   s    r   registry_addr       s(    **62H!!mh!GGr   __main__)RunnerzHashMap/HashSet insertionzRegistry insertionSuccessc                  .    t         j                  dg      S )Nr	   vis_validr   r   r   <lambda>r(   (   s    QCr   Failurec                  .    t         j                  dg      S )Nr   r%   r   r   r   r(   r(   )   s    UG)<r   zMetaschema validationc                  4    t         j                  t              S )N)r&   check_schemar   r   r   r   r(   r(   *   s    q~~f7Mr   N)__doc__referencingr   referencing.jsonschemar   rpdsr   r   
jsonschemar   r   r   r   r   r&   r   r    __name__pyperfr"   runner
bench_funcr   r   r   <module>r6      s    ! . ) + i 	
 }}: 9H
 zXF
13KL
*L9
i!89
i!<=
-/MN r   