command-line:
$ h2load http://localhost:50051/helloworld.Greeter/SayHello \ -d grpc-upload \ -H 'te: trailers' -H 'content-type: application/grpc' -n1000000 -c100 -m100
Create grpc-upload file using following python script:
#include <cstdint> | |
#include <type_traits> | |
#include <array> | |
#include <iostream> | |
#include <iterator> | |
template <int64_t... Args> struct Array { | |
const std::array<int64_t, sizeof...(Args)> data; | |
constexpr Array() : data{{Args...}} {} | |
}; |
/* | |
* nghttp2 - HTTP/2 C Library | |
* | |
* Copyright (c) 2016 Tatsuhiro Tsujikawa | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to |
#include <iostream> | |
#include <cxxabi.h> | |
template <typename T> struct TypeDescriptor {}; | |
// function | |
template <typename Ret, typename... Args> | |
std::ostream &operator<<(std::ostream &os, | |
const TypeDescriptor<Ret(Args...)> &td) { | |
return os << "function returning " << TypeDescriptor<Ret>(); |
#include <iostream> | |
#include <string> | |
#include <mutex> | |
#include <thread> | |
#include <future> | |
#include <deque> | |
#include <nghttp2/asio_http2_server.h> | |
using namespace nghttp2::asio_http2; |
#include <iostream> | |
#include <string> | |
#include <mutex> | |
#include <thread> | |
#include <future> | |
#include <deque> | |
#include <nghttp2/asio_http2_server.h> | |
using namespace nghttp2::asio_http2; |
#include <string> | |
#include <array> | |
#include <iostream> | |
// compile-time string from | |
// http://blog.biicode.com/template-metaprogramming-cpp-ii/ | |
template <char... C> struct String { | |
static constexpr std::array<char, sizeof...(C)+1> data = {{C..., '\0'}}; | |
constexpr operator const char *() const { return data.data(); } | |
}; |
#include <stdio.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#define HEXDUMP_MIN(X, Y) ((X) < (Y) ? (X) : (Y)) | |
static void hexdump8(FILE *out, const uint8_t *first, const uint8_t *last) { | |
const uint8_t *stop = HEXDUMP_MIN(first + 8, last); | |
const uint8_t *k; | |
for(k = first; k != stop; ++k) { |
command-line:
$ h2load http://localhost:50051/helloworld.Greeter/SayHello \ -d grpc-upload \ -H 'te: trailers' -H 'content-type: application/grpc' -n1000000 -c100 -m100
Create grpc-upload file using following python script:
listen: 3001 | |
http2-max-concurrent-requests-per-connection: 1024 | |
max-connections: 15000 | |
num-threads: 1 | |
hosts: | |
localhost: | |
paths: | |
/: | |
file.dir: /path/to/htdocs |