尝试brpc来升级rpc服务,测试应用过程
照着官方文档来,不过在mac下还是有些小坑
对熟悉c++的人来说很小儿科,但对c++相对比较外行 (只知道基本语法和部分数据结构)的人,还是作不到开箱即用
首先编译
```
If you need to enable cpu/heap profilers in examples:
brew install gperftools
If you need to run tests, install and compile googletest (which is not compiled yet):
git clone https://github.com/google/googletest && cd googletest/googletest && mkdir bld && cd bld && cmake .. && make && sudo mv libgtest* /usr/lib/ && cd -
```
报错
/Users/cclient/Work/Source/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h:67:60: error: expected class name
: public ParamGeneratorInterface< ::std::tuple<T1, T2> > {
^
/Users/cclient/Work/Source/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h:69:18: error: no template named 'tuple' in namespace 'std'
typedef ::std::tuple<T1, T2> ParamType;
~~~~~~~^
/Users/cclient/Work/Source/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h:74:33: warning: 'override' keyword is a C++11 extension
[-Wc++11-extensions]
~CartesianProductGenerator2() override {}
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
119 warnings and 20 errors generated.
make[2]: *** [CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[1]: *** [CMakeFiles/gtest.dir/all] Error 2
make: *** [all] Error 2
大量的std错误
查看googletest官方信息
https://github.com/google/googletest/blob/master/googletest/README.md
果然看到
```
C++ Standard Version
An environment that supports C++11 is required in order to successfully build Google Test. One way to ensure this is to specify the standard in the top-level project, for example by using the set(CMAKE_CXX_STANDARD 11) command. If this is not feasible, for example in a C project using Google Test for validation, then it can be specified by adding it to the options for cmake via the DCMAKE_CXX_FLAGS option.
```
更改
vim ../CMakeLists.txt
添加
set(CMAKE_CXX_STANDARD 11)
编译成功
jdeMacBook-Pro:bld cclient$ make
Scanning dependencies of target gtest
[ 25%] Building CXX object CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 50%] Linking CXX static library lib/libgtest.a
[ 50%] Built target gtest
Scanning dependencies of target gtest_main
[ 75%] Building CXX object CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[100%] Linking CXX static library lib/libgtest_main.a
sudo mv libgtest* /usr/lib/ && cd -
#mac 路径 更改至 /usr/local/lib/
sh config_brpc.sh --headers=/usr/local/include --libs=/usr/local/lib --cc=clang --cxx=clang++
gnu-getopt must be installed and used
bjdeMacBook-Pro:brpc cclient$ brew reinstall gnu-getopt
==> Reinstalling gnu-getopt
==> Downloading https://homebrew.bintray.com/bottles/gnu-getopt-1.1.6.high_sierra.bottle.tar.gz
Already downloaded: /Users/cclient/Library/Caches/Homebrew/downloads/bb41269c7b4673c442514e69d159a5ec6238d547266318d72d3c067be2ed448f--gnu-getopt-1.1.6.high_sierra.bottle.tar.gz
==> Pouring gnu-getopt-1.1.6.high_sierra.bottle.tar.gz
==> Caveats
gnu-getopt is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have gnu-getopt first in your PATH run:
echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bash_profile
==> Summary
尝试brpc来升级rpc服务,测试应用过程的更多相关文章
- 以太坊测试网络搭建以及RPC服务开启-配置注意事项
.Eth QA Test环境: 数据文件路径: C:\Users\Administrator\AppData\Roaming\Ethereum console启动参数: --rpc --testnet ...
- 基于开源Dubbo分布式RPC服务框架的部署整合
一.前言 Dubbo 作为SOA服务化治理方案的核心框架,用于提高业务逻辑的复用.整合.集中管理,具有极高的可靠性(HA)和伸缩性,被应用于阿里巴巴各成员站点,同时在包括JD.当当在内的众多互联网项目 ...
- NET Core微服务之路:自己动手实现Rpc服务框架,基于DotEasy.Rpc服务框架的介绍和集成
本篇内容属于非实用性(拿来即用)介绍,如对框架设计没兴趣的朋友,请略过. 快一个月没有写博文了,最近忙着两件事; 一:阅读刘墉先生的<说话的魅力>,以一种微妙的,你我大家都会经常遇见 ...
- 【Rpc】基于开源Dubbo分布式RPC服务框架的部署整合
一.前言 Dubbo 作为SOA服务化治理方案的核心框架,用于提高业务逻辑的复用.整合.集中管理,具有极高的可靠性(HA)和伸缩性,被应用于阿里巴巴各成员站点,同时在包括JD.当当在内的众多互联网项目 ...
- 为什么需要 RPC 服务?
链接:https://www.jianshu.com/p/362880b635f0 在传统的开发模式中,我们通常将系统的各个服务部署在单台机器,随着服务的扩展,这种方式已经完全无法满足系统大规模的扩展 ...
- 基于netty轻量的高性能分布式RPC服务框架forest<下篇>
基于netty轻量的高性能分布式RPC服务框架forest<上篇> 文章已经简单介绍了forest的快速入门,本文旨在介绍forest用户指南. 基本介绍 Forest是一套基于java开 ...
- Thrift 个人实战--Thrift RPC服务框架日志的优化
前言: Thrift作为Facebook开源的RPC框架, 通过IDL中间语言, 并借助代码生成引擎生成各种主流语言的rpc框架服务端/客户端代码. 不过Thrift的实现, 简单使用离实际生产环境还 ...
- 【原创】自己动手实现RPC服务调用框架
自己动手实现rpc服务调用框架 本文利用java自带的socket编程实现了一个简单的rpc调用框架,由两个工程组成分别名为battercake-provider(服务提供者).battercake- ...
- RPC服务和HTTP服务
很长时间以来都没有怎么好好搞清楚RPC(即Remote Procedure Call,远程过程调用)和HTTP调用的区别,不都是写一个服务然后在客户端调用么?这里请允许我迷之一笑~Naive!本文简单 ...
随机推荐
- MySQL-复制技术演进过程
复制技术的演进可以分为:基于数据安全的复制,基于效率的复制 基于数据安全的复制 异步复制 参考: https://baijiahao.baidu.com/s?id=163939455634386120 ...
- Ansible常见错误解析
背景 由于工作中经常用到ansible,所以整理了常用的ansible错误及原因分析,方便自己也方便别人参考. 1.shell 模块常见错误 1.1 使用shell遇到"msg": ...
- part8 vue内置标签keep-alive对网页性能优化
我们网页请求时候 我们点击路由切换 可以看network中数据请求 因为每次路由切换都会执行mounted钩子函数 我们这个函数中数据请求 //每次切换路由,页面都会重新渲染 在根组件中使用 路由切换 ...
- VEH&VCH
本文99.9%的代码及内容作者:mengwuji 来自:http://www.mengwuji.net/forum.php?mod=viewthread&tid=1371 VEH:向量化异常处 ...
- CSS行间样式与内部样式
注释 <!-- --> 快捷键 crtl+/ div 双标签<div></div> CSS语法 属性名:属性值: Css引入方式 1.行间样式的引入:在标签中 ...
- Python笔记_第五篇_Python数据分析基础教程_NumPy基础
1. NumPy的基础使用涵盖如下内容: 数据类型 数组类型 类型转换 创建数组 数组索引 数组切片 改变维度 2. NumPy数组对象: NumPy中的ndarray是一个多维数组对象,该兑现共有两 ...
- one_day_one_linuxCmd---tar命令
<坚持每天学习一个 linux 命令,今天我们来学习 tar 命令> 摘要:tar 命令是一个 Linux 下的打包程序,通常在 Linux 下,打包和压缩是不同的程序,打包通过 tar ...
- git commit 后 尚未push到远程,撤销commit
执行commit后,还没执行push时,想要撤销这次的commit,该怎么办? 解决方案: 使用命令: git reset --soft HEAD^ 这样就成功撤销了commit,如果想要连着add也 ...
- python 爬虫下载英语听力新闻(npr news)为mp3格式
想通过听实时新闻来提高英语听力,学了那么多年的英语,不能落下啊,不然白费背了那么多年的单词. npr news是美国国家公共电台,发音纯正,音频每日更新,以美国为主,世界新闻为辅,比如最近我国武汉发生 ...
- MySQL--Centos7下安装5.7.19
https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html https://segmentfault.com/a/11900000 ...