ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
test_support.h File Reference

测试支持工具声明。 More...

#include <algorithm>
#include <chrono>
#include <cstdlib>
#include <filesystem>
#include <format>
#include <future>
#include <iostream>
#include <memory>
#include <string>
#include <string_view>
#include <utility>

Classes

class  ngl_test_support::scoped_path

Functions

std::string ngl_test_support::read_env (const char *name)
bool ngl_test_support::env_flag (const char *aname)
bool ngl_test_support::test_verbose ()
int ngl_test_support::perf_scale ()
int ngl_test_support::scaled_iterations (int base_iterations)
void ngl_test_support::trace (std::string_view message)
void ngl_test_support::print_perf_result (std::string_view name, long long legacy_us, long long optimized_us)
template<typename tfun>
long long ngl_test_support::benchmark_us (tfun &&afun)
std::filesystem::path ngl_test_support::make_tmp_dir (const std::string &atest_name, std::string_view aprefix="ngl_test", bool aunique_suffix=true)
template<typename tval>
void ngl_test_support::try_set (const std::shared_ptr< std::promise< tval > > &apromise, tval avalue)
void ngl_test_support::try_set (const std::shared_ptr< std::promise< void > > &apromise)

Detailed Description

测试支持工具声明。