Skip to content

Commit a6c2495

Browse files
committed
Add HTTP benchmarking tool
The tool was derived from htstress.
1 parent dcdb340 commit a6c2495

File tree

6 files changed

+587
-4
lines changed

6 files changed

+587
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
http_parser.c
1414
http_parser.h
1515
.cache.mk
16+
htstress

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
KDIR=/lib/modules/$(shell uname -r)/build
22

3+
CFLAGS_user = -std=gnu99 -Wall -Wextra -Werror
4+
LDFLAGS_user = -lpthread
5+
36
obj-m += khttpd.o
47
khttpd-objs := \
58
http_parser.o \
69
http_server.o \
710
main.o
811

912
GIT_HOOKS := .git/hooks/applied
10-
all: $(GIT_HOOKS) http_parser.c
13+
all: $(GIT_HOOKS) http_parser.c htstress
1114
make -C $(KDIR) M=$(PWD) modules
1215

1316
$(GIT_HOOKS):
1417
@scripts/install-git-hooks
1518
@echo
1619

20+
htstress: htstress.c
21+
$(CC) $(CFLAGS_user) -o $@ $< $(LDFLAGS_user)
22+
23+
check: all
24+
@scripts/test.sh
25+
1726
clean:
1827
make -C $(KDIR) M=$(PWD) clean
28+
$(RM) htstress
1929

2030
# Download http_parser.[ch] from nodejs/http-parser repository
2131
# the inclusion of standard header files such as <string.h> will be replaced

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ The server defaults to port 8081 but this can be easily configured using command
1212

1313
## License
1414

15-
`khttpdc`is released under the MIT License. Use of this source code is governed by
15+
`khttpd` is released under the MIT License. Use of this source code is governed by
1616
a MIT License that can be found in the LICENSE file.
1717

1818
External source code:
1919
* `http_parser.[ch]`: taken from [nodejs/http-parser](https://github.com/nodejs/http-parser)
20-
- Copyright Joyent, Inc. and other Node contributors.
20+
- Copyrighted by Joyent, Inc. and other Node contributors.
2121
- MIT License
22-
22+
* `htstress.c`: derived from [htstress](https://github.com/arut/htstress)
23+
- Copyrighted byRoman Arutyunyan
24+
- 2-clause BSD license

0 commit comments

Comments
 (0)