Skip to content

Commit 3af0020

Browse files
committed
fix bench
1 parent 54b3e10 commit 3af0020

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmark/bench.mojo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ from lightbug_http.header import Headers, Header
55
from lightbug_http.io.bytes import ByteReader, ByteWriter
66
from lightbug_http.http import HTTPRequest, HTTPResponse, encode
77
from lightbug_http.uri import URI
8+
from lightbug_http.server import default_max_request_body_size, default_max_request_uri_length
89

910
alias headers = "GET /index.html HTTP/1.1\r\nHost: example.com\r\nUser-Agent: Mozilla/5.0\r\nContent-Type: text/html\r\nContent-Length: 1234\r\nConnection: close\r\nTrailer: end-of-message\r\n\r\n"
1011

@@ -73,7 +74,7 @@ fn lightbug_benchmark_request_parse(mut b: Bencher):
7374
@parameter
7475
fn request_parse():
7576
try:
76-
_ = HTTPRequest.from_bytes("127.0.0.1/path", 4096, Request.as_bytes())
77+
_ = HTTPRequest.from_bytes("127.0.0.1/path", default_max_request_body_size, default_max_request_uri_length, Request.as_bytes())
7778
except:
7879
pass
7980

0 commit comments

Comments
 (0)