Skip to content

hangukquant/cpp_benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp_benchmarks

This sample project requires several libraries, namely fmt, Boost.Beast, Boost.Asio, and OpenSSL. These can be installed easily through vcpkg.

Installing dependencies with vcpkg

# clone vcpkg if you do not already have it
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh

# install required packages (example for 64-bit Linux)
./vcpkg/vcpkg install fmt boost-beast boost-asio openssl:x64-linux

When configuring CMake, use the vcpkg.cmake toolchain file:

cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build

Running the executable

After building, run the produced binary from the build directory:

./build/main

The program connects to Binance's WebSocket trade stream and prints messages.

Header-only example

The get_mids target demonstrates using the header-only cpp-httplib library. It performs a simple HTTP GET request to Binance's midPrice endpoint. Build and run it from the build directory:

./build/get_mids

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages