teler-sh / teler-waf

teler-waf is a Go HTTP middleware that protects local web services from OWASP Top 10 threats, known vulnerabilities, malicious actors, botnets, unwanted crawlers, and brute force attacks.
https://test.teler.sh
Apache License 2.0
344 stars 32 forks source link

[docs] benchmarking #84

Closed dwisiswant0 closed 1 year ago

dwisiswant0 commented 1 year ago

Summary

The current issue pertains to the process of benchmarking and initializing the *Teler instance within the codebase. The proposed solution suggests that benchmarking should be conducted by directly invoking the corresponding threat check functions (e.g., checkCommonWebAttack, checkCVE, checkDirectoryBruteforce, etc.), instead of employing the http.Client{}.Do method approach, which incorporates the use of httptest.NewServer function.

Motivation

Documenting this change in the benchmarking process is essential to clarify how benchmarking should be performed and to ensure that the process is consistent and well understood-by all contributors. This documentation will benefit both existing and future developers who work on the codebase. It will provide clear instructions on how to conduct benchmarking, leading to better code quality and more streamlined development processes.