Skip to content

Commit 24b8f66

Browse files
OvermindDL1waghanza
authored andcommitted
Added libevent-based evhtp C++ web framework to the benchmarks (#173)
1 parent cfbe911 commit 24b8f66

File tree

8 files changed

+646
-1
lines changed

8 files changed

+646
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
all: elixir node ruby crystal go rust swift python nim csharp scala client benchmarker
1+
all: cpp elixir node ruby crystal go rust swift python nim csharp scala client benchmarker
2+
3+
# --- C++/CPP ---
4+
cpp: evhtp
5+
6+
evhtp:
7+
cd cpp/evhtp && cmake -H. -B_builds -DCMAKE_BUILD_TYPE=Release && cmake --build _builds --config Release
8+
ln -s -f ../cpp/evhtp/_builds/server_cpp_evhtp bin/.
29

310
# --- Elixir ---
411
elixir: plug phoenix

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ CPU Cores: 8
153153
- [mofuw](https://github.com/2vg/mofuw)
154154
- Objective-C
155155
- [Criollo](https://criollo.io/)
156+
- C++/CPP
157+
- [evhtp](https://github.com/criticalstack/libevhtp)
156158

157159
See Development section when you want to add new languages or frameworks.
158160

cpp/evhtp/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/_builds/*

cpp/evhtp/CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required(VERSION 3.1)
2+
3+
include("cmake/HunterGate.cmake")
4+
HunterGate(
5+
URL "https://github.com/ruslo/hunter/archive/v0.20.32.tar.gz"
6+
SHA1 "72bd88df338cb1b02d4c36c3f85ac87b33578eab"
7+
)
8+
9+
project(server_cpp_evhtp)
10+
11+
hunter_add_package(libevhtp)
12+
find_package(libevhtp CONFIG REQUIRED)
13+
14+
set(CMAKE_CXX_STANDARD 11)
15+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
16+
set(CMAKE_CXX_EXTENSIONS OFF)
17+
18+
add_executable(server_cpp_evhtp main.cpp)
19+
target_link_libraries(server_cpp_evhtp libevhtp::evhtp)
20+

0 commit comments

Comments
 (0)