typescript-runtime-type-benchmarks icon indicating copy to clipboard operation
typescript-runtime-type-benchmarks copied to clipboard

What about adding much more test cases?

Open samchon opened this issue 3 years ago • 3 comments

https://github.com/samchon/typescript-json/tree/master/test/structures

I'm developing a runtime type checker (validator) library, and have prepared lots of test cases, for hardcore validation.

How about typescript-runtime-type-benchmarks to adapt such test cases?

They may be useful.

samchon avatar Jul 05 '22 20:07 samchon

If you want to see use-case for benchmark:

https://github.com/samchon/typescript-json/blob/master/benchmark/features/benchmark_is.ts

samchon avatar Jul 05 '22 20:07 samchon

I am open to having more tests, but we need to be mindful of total run time. If we have too many or too slow ones then it'll be taking a long time, and we can even eventually run out of CI time limit 😁

But having more different tests, I think is a good idea overall. Just need to understand what we are targeting and what are usually the slow parts.

moltar avatar Jul 07 '22 15:07 moltar

Validation failures are also one less-benchmarked case. Their performance also becomes relevant in cases like union/oneOf/... where some subvalidators might fail while the whole validation succeeds as a whole.

jviide avatar Aug 05 '22 11:08 jviide

Wrote another issue with a little bit different idea -> #1025

samchon avatar Feb 08 '23 12:02 samchon