U
    kufY                     @   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rd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 )zN
A benchmark which tries to compare the possible slow subparts of validation.
    )Registry)DRAFT202012)HashTrieMapHashTrieSet)Draft202012Validatorarray   typeinteger)r	   Z	minLengthZ	maxLengthitemsc                   C   s   t ddtdfS )Nfoobar)hmapinserthset r   r   G/tmp/pip-unpacked-wheel-k94ccfep/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   Zcreate_resourceschemaregistryZwith_resource)r   r   r   r   registry_add   s    
r   __main__)RunnerzHashMap/HashSet insertionzRegistry insertionZSuccessc                   C   s   t dgS )Nr   vZis_validr   r   r   r   <lambda>(       r   ZFailurec                   C   s   t dgS )Nr   r   r   r   r   r   r   )   r   zMetaschema validationc                   C   s
   t tS )N)r   Zcheck_schemar   r   r   r   r   r   *   r   N)__doc__Zreferencingr   Zreferencing.jsonschemar   Zrpdsr   r   Z
jsonschemar   r   r   r   r   r   r   r   __name__Zpyperfr   runnerZ
bench_funcr   r   r   r   <module>   s.   