尝试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!本文简单 ...
随机推荐
- GCPC 2013_A Boggle DFS+字典树 CSU 1457
上周比赛的题目,由于那个B题被神编译器的优化功能给卡了,就没动过这个题,其实就是个字典树嘛.当然,由于要在Boggle矩阵里得到初始序列,我还一度有点虚,不知道是用BFS还是DFS,最后发现DFS要好 ...
- 实验吧-密码学-js(Chrome用console.log调试js)
题目就是js,可能就是一个js的代码,查看源码并复制,在Chrome中打开网页,审查元素. 将复制的代码输入,将eval改成console.log,再回车执行,就得到一段js代码. 代码中有Unico ...
- [GXYCTF2019]BabySQli
0x00 知识点 emmm这道题目就是脑洞得大,能猜后端源码 0x01 解题 查看源码: base32,base64解码得到 select * from user where username = ' ...
- Vue 项目de一些准备工作
1.安装node,同时也会自动安装npm,npm是node的一种包安装工具. 2.准备一个git,可以用来管理代码. 3.打开vue官网,可以使用vue-cli脚手架工作. 这里介绍一个element ...
- Codeforces 1296E1 - String Coloring (easy version)
题目大意: 给定一段长度为n的字符串s 你需要给每个字符进行涂色,然后相邻的不同色的字符可以进行交换 需要保证涂色后能通过相邻交换把这个字符串按照字典序排序(a~z) 你只有两种颜色可以用来涂 问是否 ...
- JavaWeb之搭建自己的MVC框架(三)
1. 前言 在前两节的内容中,我们完成了一个基本的框架搭建.但是如果我们在前端请求中增加参数,我们要怎么传递到后台方法呢?接下来我们就来研讨这部分内容. 2. 实现 ( ...
- VS2013的工程移植到VS2008
VS2013的工程完成后,用VS2008创建一个名称一样的工程(大小写也一样). 具体过程参考http://blog.csdn.net/sz76211822/article/details/42775 ...
- 学生选课系统(Java语言期末前测试)
测试具体要求: 2.系统要求与功能设计 2.1 页面要求 (1)能够在Tomcat服务器中正确部署,并通过浏览器查看: (2)网站页面整体风格统一: (3)首页(登录页)要求实现不同用户登录后,进 ...
- Codeforces 405D 数学问题
真是脑残...擦 具体题解在这里 http://www.cnblogs.com/windysai/p/3619222.html 原本我为了防止两个数冲突,设置了好多判断,结果发现,如果两个数冲突,另外 ...
- scrapy 在pycharm中调试 不用到命令行中启动爬虫方法
(目录结构如上图) 在主目录中加入main.py,在其中加入代码,运行此文件就可以运行整个爬虫: # -*- coding: utf-8 -*- __author__='pasaulis' #在程序中 ...