Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
0630ae1e
Commit
0630ae1e
authored
Sep 02, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch svn r35206 & fix compilation of tools
parent
8d4e0d81
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
286 additions
and
299 deletions
+286
-299
LICENSE
LICENSE
+0
-0
brpc_builtin_service_unittest.cpp
test/brpc_builtin_service_unittest.cpp
+1
-2
brpc_channel_unittest.cpp
test/brpc_channel_unittest.cpp
+1
-2
brpc_controller_unittest.cpp
test/brpc_controller_unittest.cpp
+1
-2
brpc_esp_protocol_unittest.cpp
test/brpc_esp_protocol_unittest.cpp
+1
-2
brpc_event_dispatcher_unittest.cpp
test/brpc_event_dispatcher_unittest.cpp
+1
-2
brpc_extension_unittest.cpp
test/brpc_extension_unittest.cpp
+1
-2
brpc_hpack_unittest.cpp
test/brpc_hpack_unittest.cpp
+1
-2
brpc_http_message_unittest.cpp
test/brpc_http_message_unittest.cpp
+1
-2
brpc_http_parser_unittest.cpp
test/brpc_http_parser_unittest.cpp
+1
-2
brpc_http_rpc_protocol_unittest.cpp
test/brpc_http_rpc_protocol_unittest.cpp
+1
-2
brpc_http_status_code_unittest.cpp
test/brpc_http_status_code_unittest.cpp
+1
-2
brpc_hulu_pbrpc_protocol_unittest.cpp
test/brpc_hulu_pbrpc_protocol_unittest.cpp
+1
-2
brpc_input_messenger_unittest.cpp
test/brpc_input_messenger_unittest.cpp
+1
-2
brpc_load_balancer_unittest.cpp
test/brpc_load_balancer_unittest.cpp
+1
-2
brpc_memcache_unittest.cpp
test/brpc_memcache_unittest.cpp
+1
-2
brpc_mongo_protocol_unittest.cpp
test/brpc_mongo_protocol_unittest.cpp
+1
-2
brpc_naming_service_filter_unittest.cpp
test/brpc_naming_service_filter_unittest.cpp
+1
-2
brpc_naming_service_unittest.cpp
test/brpc_naming_service_unittest.cpp
+1
-3
brpc_nova_pbrpc_protocol_unittest.cpp
test/brpc_nova_pbrpc_protocol_unittest.cpp
+1
-2
brpc_proto_unittest.cpp
test/brpc_proto_unittest.cpp
+1
-2
brpc_public_pbrpc_protocol_unittest.cpp
test/brpc_public_pbrpc_protocol_unittest.cpp
+1
-2
brpc_redis_unittest.cpp
test/brpc_redis_unittest.cpp
+1
-2
brpc_rtmp_unittest.cpp
test/brpc_rtmp_unittest.cpp
+1
-2
brpc_server_unittest.cpp
test/brpc_server_unittest.cpp
+1
-2
brpc_snappy_compress_unittest.cpp
test/brpc_snappy_compress_unittest.cpp
+1
-2
brpc_socket_map_unittest.cpp
test/brpc_socket_map_unittest.cpp
+1
-2
brpc_socket_unittest.cpp
test/brpc_socket_unittest.cpp
+1
-2
brpc_sofa_pbrpc_protocol_unittest.cpp
test/brpc_sofa_pbrpc_protocol_unittest.cpp
+1
-2
brpc_streaming_rpc_unittest.cpp
test/brpc_streaming_rpc_unittest.cpp
+1
-2
brpc_uri_unittest.cpp
test/brpc_uri_unittest.cpp
+1
-2
Makefile
tools/parallel_http/Makefile
+13
-28
parallel_http.cpp
tools/parallel_http/parallel_http.cpp
+14
-3
Makefile
tools/rpc_press/Makefile
+9
-24
info_thread.cpp
tools/rpc_press/info_thread.cpp
+13
-7
info_thread.h
tools/rpc_press/info_thread.h
+13
-7
json_loader.cpp
tools/rpc_press/json_loader.cpp
+13
-5
json_loader.h
tools/rpc_press/json_loader.h
+13
-5
pb_util.cpp
tools/rpc_press/pb_util.cpp
+14
-13
pb_util.h
tools/rpc_press/pb_util.h
+14
-13
rpc_press.cpp
tools/rpc_press/rpc_press.cpp
+13
-5
rpc_press_impl.cpp
tools/rpc_press/rpc_press_impl.cpp
+13
-5
rpc_press_impl.h
tools/rpc_press/rpc_press_impl.h
+13
-5
Makefile
tools/rpc_replay/Makefile
+9
-24
info_thread.cpp
tools/rpc_replay/info_thread.cpp
+13
-7
info_thread.h
tools/rpc_replay/info_thread.h
+13
-7
rpc_replay.cpp
tools/rpc_replay/rpc_replay.cpp
+13
-7
Makefile
tools/rpc_view/Makefile
+18
-35
rpc_view.cpp
tools/rpc_view/rpc_view.cpp
+13
-7
Makefile
tools/trackme_server/Makefile
+9
-24
trackme_server.cpp
tools/trackme_server/trackme_server.cpp
+13
-7
No files found.
LICENSE
0 → 100644
View file @
0630ae1e
This diff is collapsed.
Click to expand it.
test/brpc_builtin_service_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/epoll.h>
...
...
test/brpc_channel_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/epoll.h>
...
...
test/brpc_controller_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
test/brpc_esp_protocol_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/ioctl.h>
#include <sys/ioctl.h>
...
...
test/brpc_event_dispatcher_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/epoll.h>
...
...
test/brpc_extension_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/epoll.h>
...
...
test/brpc_hpack_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: 2017/04/25 00:23:12
// Date: 2017/04/25 00:23:12
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
test/brpc_http_message_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date 2014/10/24 16:44:30
// Date 2014/10/24 16:44:30
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
test/brpc_http_parser_unittest.cpp
View file @
0630ae1e
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// File test_http_parser.cpp
// File test_http_parser.cpp
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date 2014/10/22 09:58:14
// Date 2014/10/22 09:58:14
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
test/brpc_http_rpc_protocol_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/ioctl.h>
#include <sys/ioctl.h>
...
...
test/brpc_http_status_code_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// File: test_http_status_code.cpp
// File: test_http_status_code.cpp
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: 2014/11/04 18:33:39
// Date: 2014/11/04 18:33:39
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
test/brpc_hulu_pbrpc_protocol_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/ioctl.h>
#include <sys/ioctl.h>
...
...
test/brpc_input_messenger_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/epoll.h>
...
...
test/brpc_load_balancer_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/epoll.h>
...
...
test/brpc_memcache_unittest.cpp
View file @
0630ae1e
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Thu Jun 11 14:30:07 CST 2015
// Date: Thu Jun 11 14:30:07 CST 2015
#include <iostream>
#include <iostream>
...
...
test/brpc_mongo_protocol_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 201
5 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 201
4 baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Thu Oct 15 21:08:31 CST 2015
// Date: Thu Oct 15 21:08:31 CST 2015
#include <sys/ioctl.h>
#include <sys/ioctl.h>
...
...
test/brpc_naming_service_filter_unittest.cpp
View file @
0630ae1e
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// File test_baidu_naming_service.cpp
// File test_baidu_naming_service.cpp
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date 2014/10/20 13:50:10
// Date 2014/10/20 13:50:10
#include <stdio.h>
#include <stdio.h>
...
...
test/brpc_naming_service_unittest.cpp
View file @
0630ae1e
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors
// File test_baidu_naming_service.cpp
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date 2014/10/20 13:50:10
// Date 2014/10/20 13:50:10
#include <stdio.h>
#include <stdio.h>
...
...
test/brpc_nova_pbrpc_protocol_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/ioctl.h>
#include <sys/ioctl.h>
...
...
test/brpc_proto_unittest.cpp
View file @
0630ae1e
// Copyright (c) 201
5 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 201
4 baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: 2015/03/31 14:50:20
// Date: 2015/03/31 14:50:20
...
...
test/brpc_public_pbrpc_protocol_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/ioctl.h>
#include <sys/ioctl.h>
...
...
test/brpc_redis_unittest.cpp
View file @
0630ae1e
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Thu Jun 11 14:30:07 CST 2015
// Date: Thu Jun 11 14:30:07 CST 2015
#include <iostream>
#include <iostream>
...
...
test/brpc_rtmp_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 201
6 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 201
4 baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Fri May 20 15:52:22 CST 2016
// Date: Fri May 20 15:52:22 CST 2016
#include <sys/ioctl.h>
#include <sys/ioctl.h>
...
...
test/brpc_server_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/epoll.h>
...
...
test/brpc_snappy_compress_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 201
5 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 201
4 baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: 2015/01/20 19:01:06
// Date: 2015/01/20 19:01:06
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
test/brpc_socket_map_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
test/brpc_socket_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/epoll.h>
...
...
test/brpc_sofa_pbrpc_protocol_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: Sun Jul 13 15:04:18 CST 2014
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/ioctl.h>
#include <sys/ioctl.h>
...
...
test/brpc_streaming_rpc_unittest.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 201
5 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 201
4 baidu-rpc authors
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date: 2015/10/22 16:28:44
// Date: 2015/10/22 16:28:44
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
test/brpc_uri_unittest.cpp
View file @
0630ae1e
// Copyright (c) 2014
Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014
baidu-rpc authors
// File test_uri.cpp
// File test_uri.cpp
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// Date 2014/10/27 14:19:35
// Date 2014/10/27 14:19:35
#include <gtest/gtest.h>
#include <gtest/gtest.h>
...
...
tools/parallel_http/Makefile
View file @
0630ae1e
CC
=
gcc
BRPC_PATH
=
../../
CXX
=
g++
include
$(BRPC_PATH)/config.mk
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
-Wno-unused-parameter
CXXFLAGS
=
$(CPPFLAGS)
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
CFLAGS
=
$(CPPFLAGS)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
GFLAGS_PATH
=
../../../../../third-64/gflags
STATIC_LINKINGS
+=
-lbrpc
LEVELDB_PATH
=
../../../../../third-64/leveldb
PROTOBUF_PATH
=
../../../../../third-64/protobuf
BRPC_PATH
=
../../output
INCPATH
=
-I
$(BRPC_PATH)
/include
-I
$(GFLAGS_PATH)
/include
-I
$(LEVELDB_PATH)
/include
-I
$(PROTOBUF_PATH)
/include
PROTOC
=
$(PROTOBUF_PATH)
/bin/protoc
LIBS
=
$(BRPC_PATH)
/lib/libbase.a
\
$(BRPC_PATH)
/lib/libbrpc.a
\
$(BRPC_PATH)
/lib/libbthread.a
\
$(BRPC_PATH)
/lib/libbvar.a
\
$(BRPC_PATH)
/lib/libjson2pb.a
\
$(BRPC_PATH)
/lib/libmcpack2pb.a
\
$(GFLAGS_PATH)
/lib/libgflags.a
\
$(LEVELDB_PATH)
/lib/libleveldb.a
\
$(PROTOBUF_PATH)
/lib/libprotobuf.a
\
-lpthread
-lrt
-lssl
-lcrypto
-ldl
-lz
CLIENT_SOURCES
=
parallel_http.cpp
SOURCES
=
$
(
wildcard
*
.cpp
)
CLIENT_OBJS
=
$
(
addsuffix .o,
$
(
basename
$(CLIENT_
SOURCES)
))
OBJS
=
$
(
addsuffix .o,
$
(
basename
$(
SOURCES)
))
.PHONY
:
all
.PHONY
:
all
all
:
parallel_http
all
:
parallel_http
...
@@ -29,16 +14,16 @@ all: parallel_http
...
@@ -29,16 +14,16 @@ all: parallel_http
.PHONY
:
clean
.PHONY
:
clean
clean
:
clean
:
@
echo
"Cleaning"
@
echo
"Cleaning"
@
rm
-rf
parallel_http
$(
CLIENT_
OBJS)
@
rm
-rf
parallel_http
$(OBJS)
parallel_http
:
$(
CLIENT_
OBJS)
parallel_http
:
$(OBJS)
@
echo
"Linking
$@
"
@
echo
"Linking
$@
"
@
$(CXX)
-Xlinker
"-("
$^
$(LIBS)
-Xlinker
"-)"
-o
$@
@
$(CXX)
$(LIBPATHS)
-Xlinker
"-("
$^
-Wl
,-Bstatic
$(STATIC_LINKINGS)
-Wl
,-Bdynamic
-Xlinker
"-)"
$(DYNAMIC_LINKINGS)
-o
$@
%.o
:
%.cpp
%.o
:
%.cpp
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
%.o
:
%.cc
%.o
:
%.cc
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
tools/parallel_http/parallel_http.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2016 baidu-rpc authors.
// Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Access many http servers in parallel, much faster than curl (even called in batch)
// Access many http servers in parallel, much faster than curl (even called in batch)
#include <gflags/gflags.h>
#include <gflags/gflags.h>
...
...
tools/rpc_press/Makefile
View file @
0630ae1e
CC
=
gcc
BRPC_PATH
=
../../
CXX
=
g++
include
$(BRPC_PATH)/config.mk
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
-Wno-unused-parameter
CXXFLAGS
=
$(CPPFLAGS)
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
CFLAGS
=
$(CPPFLAGS)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
GFLAGS_PATH
=
../../../../../third-64/gflags
STATIC_LINKINGS
+=
-lbrpc
LEVELDB_PATH
=
../../../../../third-64/leveldb
PROTOBUF_PATH
=
../../../../../third-64/protobuf
BRPC_PATH
=
../../output
INCPATH
=
-I
$(BRPC_PATH)
/include
-I
$(GFLAGS_PATH)
/include
-I
$(LEVELDB_PATH)
/include
-I
$(PROTOBUF_PATH)
/include
PROTOC
=
$(PROTOBUF_PATH)
/bin/protoc
LIBS
=
$(BRPC_PATH)
/lib/libbase.a
\
$(BRPC_PATH)
/lib/libbrpc.a
\
$(BRPC_PATH)
/lib/libbthread.a
\
$(BRPC_PATH)
/lib/libbvar.a
\
$(BRPC_PATH)
/lib/libjson2pb.a
\
$(BRPC_PATH)
/lib/libmcpack2pb.a
\
$(GFLAGS_PATH)
/lib/libgflags.a
\
$(LEVELDB_PATH)
/lib/libleveldb.a
\
$(PROTOBUF_PATH)
/lib/libprotobuf.a
\
-lpthread
-lrt
-lssl
-lcrypto
-ldl
-lz
SOURCES
=
$
(
wildcard
*
.cpp
)
SOURCES
=
$
(
wildcard
*
.cpp
)
OBJS
=
$
(
addsuffix .o,
$
(
basename
$(SOURCES)
))
OBJS
=
$
(
addsuffix .o,
$
(
basename
$(SOURCES)
))
...
@@ -33,12 +18,12 @@ clean:
...
@@ -33,12 +18,12 @@ clean:
rpc_press
:
$(OBJS)
rpc_press
:
$(OBJS)
@
echo
"Linking
$@
"
@
echo
"Linking
$@
"
@
$(CXX)
-Xlinker
"-("
$^
$(LIBS)
-Xlinker
"-)"
-o
$@
@
$(CXX)
$(LIBPATHS)
-Xlinker
"-("
$^
-Wl
,-Bstatic
$(STATIC_LINKINGS)
-Wl
,-Bdynamic
-Xlinker
"-)"
$(DYNAMIC_LINKINGS)
-o
$@
%.o
:
%.cpp
%.o
:
%.cpp
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
%.o
:
%.cc
%.o
:
%.cc
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
tools/rpc_press/info_thread.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// If you have any problem, contact us:
// you may not use this file except in compliance with the License.
// Baidu Hi : group 1296497
// You may obtain a copy of the License at
// Email : pbrpc@baidu.com
//
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "info_thread.h"
#include "info_thread.h"
...
...
tools/rpc_press/info_thread.h
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// If you have any problem, contact us:
// you may not use this file except in compliance with the License.
// Baidu Hi : group 1296497
// You may obtain a copy of the License at
// Email : pbrpc@baidu.com
//
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef BRPC_RPC_REPLAY_INFO_THREAD_H
#ifndef BRPC_RPC_REPLAY_INFO_THREAD_H
#define BRPC_RPC_REPLAY_INFO_THREAD_H
#define BRPC_RPC_REPLAY_INFO_THREAD_H
...
...
tools/rpc_press/json_loader.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// you may not use this file except in compliance with the License.
// Date: 2014-10-29 14:20
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <algorithm>
#include <algorithm>
#include <base/logging.h>
#include <base/logging.h>
...
...
tools/rpc_press/json_loader.h
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// you may not use this file except in compliance with the License.
// Date: 2014-10-29 14:20
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef BRPC_JSON_LOADER_H
#ifndef BRPC_JSON_LOADER_H
#define BRPC_JSON_LOADER_H
#define BRPC_JSON_LOADER_H
...
...
tools/rpc_press/pb_util.cpp
View file @
0630ae1e
/***********************************************************
// Copyright (c) 2014 baidu-rpc authors.
*
//
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Licensed under the Apache License, Version 2.0 (the "License");
*
// you may not use this file except in compliance with the License.
* Author: tiankui01@baidu.com
// You may obtain a copy of the License at
*
//
* Last modified: 2014-10-29 14:20
// http://www.apache.org/licenses/LICENSE-2.0
*
//
* Filename: pb_util.cpp
// Unless required by applicable law or agreed to in writing, software
*
// distributed under the License is distributed on an "AS IS" BASIS,
* Description:
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
// See the License for the specific language governing permissions and
**********************************************************/
// limitations under the License.
#include <base/logging.h>
#include <base/logging.h>
#include "pb_util.h"
#include "pb_util.h"
...
...
tools/rpc_press/pb_util.h
View file @
0630ae1e
/***********************************************************
// Copyright (c) 2014 baidu-rpc authors.
*
//
* Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Licensed under the Apache License, Version 2.0 (the "License");
*
// you may not use this file except in compliance with the License.
* Author: tiankui01@baidu.com
// You may obtain a copy of the License at
*
//
* Last modified: 2014-10-29 14:20
// http://www.apache.org/licenses/LICENSE-2.0
*
//
* Filename: pb_util.h
// Unless required by applicable law or agreed to in writing, software
*
// distributed under the License is distributed on an "AS IS" BASIS,
* Description:
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
// See the License for the specific language governing permissions and
**********************************************************/
// limitations under the License.
#ifndef UTIL_PB_UTIL_H
#ifndef UTIL_PB_UTIL_H
#define UTIL_PB_UTIL_H
#define UTIL_PB_UTIL_H
#include "google/protobuf/message.h"
#include "google/protobuf/message.h"
...
...
tools/rpc_press/rpc_press.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2015 baidu-rpc authors.
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// you may not use this file except in compliance with the License.
// Date: 2015-08-13 19:36:09
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <gflags/gflags.h>
#include <gflags/gflags.h>
#include <google/protobuf/dynamic_message.h>
#include <google/protobuf/dynamic_message.h>
...
...
tools/rpc_press/rpc_press_impl.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2015 baidu-rpc authors.
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// you may not use this file except in compliance with the License.
// Date: 2015-08-13 19:36:09
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdio.h>
#include <stdio.h>
#include <pthread.h>
#include <pthread.h>
...
...
tools/rpc_press/rpc_press_impl.h
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2015 baidu-rpc authors.
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// Author: The baidu-rpc authors (pbrpc@baidu.com)
// you may not use this file except in compliance with the License.
// Date: 2015-08-13 19:36:09
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef PBRPCPRESS_PBRPC_PRESS_H
#ifndef PBRPCPRESS_PBRPC_PRESS_H
#define PBRPCPRESS_PBRPC_PRESS_H
#define PBRPCPRESS_PBRPC_PRESS_H
...
...
tools/rpc_replay/Makefile
View file @
0630ae1e
CC
=
gcc
BRPC_PATH
=
../../
CXX
=
g++
include
$(BRPC_PATH)/config.mk
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
-Wno-unused-parameter
CXXFLAGS
=
$(CPPFLAGS)
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
CFLAGS
=
$(CPPFLAGS)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
GFLAGS_PATH
=
../../../../../third-64/gflags
STATIC_LINKINGS
+=
-lbrpc
LEVELDB_PATH
=
../../../../../third-64/leveldb
PROTOBUF_PATH
=
../../../../../third-64/protobuf
BRPC_PATH
=
../../output
INCPATH
=
-I
$(BRPC_PATH)
/include
-I
$(GFLAGS_PATH)
/include
-I
$(LEVELDB_PATH)
/include
-I
$(PROTOBUF_PATH)
/include
PROTOC
=
$(PROTOBUF_PATH)
/bin/protoc
LIBS
=
$(BRPC_PATH)
/lib/libbase.a
\
$(BRPC_PATH)
/lib/libbrpc.a
\
$(BRPC_PATH)
/lib/libbthread.a
\
$(BRPC_PATH)
/lib/libbvar.a
\
$(BRPC_PATH)
/lib/libjson2pb.a
\
$(BRPC_PATH)
/lib/libmcpack2pb.a
\
$(GFLAGS_PATH)
/lib/libgflags.a
\
$(LEVELDB_PATH)
/lib/libleveldb.a
\
$(PROTOBUF_PATH)
/lib/libprotobuf.a
\
-lpthread
-lrt
-lssl
-lcrypto
-ldl
-lz
SOURCES
=
$
(
wildcard
*
.cpp
)
SOURCES
=
$
(
wildcard
*
.cpp
)
OBJS
=
$
(
addsuffix .o,
$
(
basename
$(SOURCES)
))
OBJS
=
$
(
addsuffix .o,
$
(
basename
$(SOURCES)
))
...
@@ -33,12 +18,12 @@ clean:
...
@@ -33,12 +18,12 @@ clean:
rpc_replay
:
$(OBJS)
rpc_replay
:
$(OBJS)
@
echo
"Linking
$@
"
@
echo
"Linking
$@
"
@
$(CXX)
-Xlinker
"-("
$^
$(LIBS)
-Xlinker
"-)"
-o
$@
@
$(CXX)
$(LIBPATHS)
-Xlinker
"-("
$^
-Wl
,-Bstatic
$(STATIC_LINKINGS)
-Wl
,-Bdynamic
-Xlinker
"-)"
$(DYNAMIC_LINKINGS)
-o
$@
%.o
:
%.cpp
%.o
:
%.cpp
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
%.o
:
%.cc
%.o
:
%.cc
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
tools/rpc_replay/info_thread.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// If you have any problem, contact us:
// you may not use this file except in compliance with the License.
// Baidu Hi : group 1296497
// You may obtain a copy of the License at
// Email : pbrpc@baidu.com
//
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "info_thread.h"
#include "info_thread.h"
...
...
tools/rpc_replay/info_thread.h
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// If you have any problem, contact us:
// you may not use this file except in compliance with the License.
// Baidu Hi : group 1296497
// You may obtain a copy of the License at
// Email : pbrpc@baidu.com
//
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef BRPC_RPC_REPLAY_INFO_THREAD_H
#ifndef BRPC_RPC_REPLAY_INFO_THREAD_H
#define BRPC_RPC_REPLAY_INFO_THREAD_H
#define BRPC_RPC_REPLAY_INFO_THREAD_H
...
...
tools/rpc_replay/rpc_replay.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// If you have any problem, contact us:
// you may not use this file except in compliance with the License.
// Baidu Hi : group 1296497
// You may obtain a copy of the License at
// Email : pbrpc@baidu.com
//
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <gflags/gflags.h>
#include <gflags/gflags.h>
#include <base/logging.h>
#include <base/logging.h>
...
...
tools/rpc_view/Makefile
View file @
0630ae1e
CC
=
gcc
BRPC_PATH
=
../../
CXX
=
g++
include
$(BRPC_PATH)/config.mk
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
# Notes on the flags:
CXXFLAGS
=
$(CPPFLAGS)
# 1. Added -fno-omit-frame-pointer: perf/tcmalloc-profiler use frame pointers by default
CFLAGS
=
$(CPPFLAGS)
# 2. Added -D__const__= : Avoid over-optimizations of TLS variables by GCC>=4.8
GFLAGS_PATH
=
../../../../../third-64/gflags
CXXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-Wno-unused-parameter
-fPIC
-fno-omit-frame-pointer
LEVELDB_PATH
=
../../../../../third-64/leveldb
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
PROTOBUF_PATH
=
../../../../../third-64/protobuf
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
BRPC_PATH
=
../../output
STATIC_LINKINGS
+=
-lbrpc
INCPATH
=
-I
$(BRPC_PATH)
/include
-I
$(GFLAGS_PATH)
/include
-I
$(LEVELDB_PATH)
/include
-I
$(PROTOBUF_PATH)
/include
PROTOC
=
$(PROTOBUF_PATH)
/bin/protoc
LIBS
=
$(BRPC_PATH)
/lib/libbase.a
\
$(BRPC_PATH)
/lib/libbrpc.a
\
$(BRPC_PATH)
/lib/libbthread.a
\
$(BRPC_PATH)
/lib/libbvar.a
\
$(BRPC_PATH)
/lib/libjson2pb.a
\
$(BRPC_PATH)
/lib/libmcpack2pb.a
\
$(GFLAGS_PATH)
/lib/libgflags.a
\
$(LEVELDB_PATH)
/lib/libleveldb.a
\
$(PROTOBUF_PATH)
/lib/libprotobuf.a
\
-lpthread
\
-lrt
\
-lssl
\
-lcrypto
\
-ldl
\
-lz
CLIENT_SOURCES
=
rpc_view.cpp
CLIENT_SOURCES
=
rpc_view.cpp
PROTOS
=
view.proto
PROTOS
=
$
(
wildcard
*
.proto
)
PROTO_OBJS
=
$
(
addsuffix .pb.o,
$
(
basename
$(PROTOS)
)
)
PROTO_OBJS
=
$
(
PROTOS:.proto
=
.pb.o
)
PROTO_GENS
=
$
(
addsuffix .pb.h,
$
(
basename
$(PROTOS)
))
$
(
addsuffix .pb.cc,
$
(
basename
$(PROTOS)
)
)
PROTO_GENS
=
$
(
PROTOS:.proto
=
.pb.h
)
$
(
PROTOS:.proto
=
.pb.cc
)
CLIENT_OBJS
=
$
(
addsuffix .o,
$
(
basename
$(CLIENT_SOURCES)
))
CLIENT_OBJS
=
$
(
addsuffix .o,
$
(
basename
$(CLIENT_SOURCES)
))
.PHONY
:
all
.PHONY
:
all
all
:
rpc_view
all
:
rpc_view
.PHONY
:
clean
.PHONY
:
clean
clean
:
clean
:
...
@@ -42,16 +25,16 @@ clean:
...
@@ -42,16 +25,16 @@ clean:
rpc_view
:
$(PROTO_OBJS) $(CLIENT_OBJS)
rpc_view
:
$(PROTO_OBJS) $(CLIENT_OBJS)
@
echo
"Linking
$@
"
@
echo
"Linking
$@
"
@
$(CXX)
-Xlinker
"-("
$^
$(LIBS)
-Xlinker
"-)"
-o
$@
$(CXX)
$(LIBPATHS)
-Xlinker
"-("
$^
-Wl
,-Bstatic
$(STATIC_LINKINGS)
-Wl
,-Bdynamic
-Xlinker
"-)"
$(DYNAMIC_LINKINGS)
-o
$@
%.pb.cc
:
%.proto
%.pb.cc
%.pb.h
:
%.proto
@
echo
"Generating
$@
"
@
echo
"Generating
$@
"
@
$(PROTOC)
--cpp_out
=
.
--proto_path
=
.
$<
@
$(PROTOC)
--cpp_out
=
.
--proto_path
=
.
$
(PROTOC_EXTRA_ARGS)
$
<
%.o
:
%.cpp
%.o
:
%.cpp
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
%.o
:
%.cc
%.o
:
%.cc
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
tools/rpc_view/rpc_view.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// If you have any problem, contact us:
// you may not use this file except in compliance with the License.
// Baidu Hi : group 1296497
// You may obtain a copy of the License at
// Email : pbrpc@baidu.com
//
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <gflags/gflags.h>
#include <gflags/gflags.h>
#include <base/logging.h>
#include <base/logging.h>
...
...
tools/trackme_server/Makefile
View file @
0630ae1e
CC
=
gcc
BRPC_PATH
=
../../
CXX
=
g++
include
$(BRPC_PATH)/config.mk
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-D__const__
=
CXXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
CXXFLAGS
=
$(CPPFLAGS)
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
CFLAGS
=
$(CPPFLAGS)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
GFLAGS_PATH
=
../../../../../third-64/gflags
STATIC_LINKINGS
+=
-lbrpc
LEVELDB_PATH
=
../../../../../third-64/leveldb
PROTOBUF_PATH
=
../../../../../third-64/protobuf
BRPC_PATH
=
../../output
INCPATH
=
-I
$(BRPC_PATH)
/include
-I
$(GFLAGS_PATH)
/include
-I
$(LEVELDB_PATH)
/include
-I
$(PROTOBUF_PATH)
/include
PROTOC
=
$(PROTOBUF_PATH)
/bin/protoc
LIBS
=
$(BRPC_PATH)
/lib/libbase.a
\
$(BRPC_PATH)
/lib/libbrpc.a
\
$(BRPC_PATH)
/lib/libbthread.a
\
$(BRPC_PATH)
/lib/libbvar.a
\
$(BRPC_PATH)
/lib/libjson2pb.a
\
$(BRPC_PATH)
/lib/libmcpack2pb.a
\
$(GFLAGS_PATH)
/lib/libgflags.a
\
$(LEVELDB_PATH)
/lib/libleveldb.a
\
$(PROTOBUF_PATH)
/lib/libprotobuf.a
\
-lpthread
-lrt
-lssl
-lcrypto
-ldl
-lz
SOURCES
=
$
(
wildcard
*
.cpp
)
SOURCES
=
$
(
wildcard
*
.cpp
)
OBJS
=
$
(
addsuffix .o,
$
(
basename
$(SOURCES)
))
OBJS
=
$
(
addsuffix .o,
$
(
basename
$(SOURCES)
))
...
@@ -33,12 +18,12 @@ clean:
...
@@ -33,12 +18,12 @@ clean:
trackme_server
:
$(OBJS)
trackme_server
:
$(OBJS)
@
echo
"Linking
$@
"
@
echo
"Linking
$@
"
@
$(CXX)
-Xlinker
"-("
$^
$(LIBS)
-Xlinker
"-)"
-o
$@
@
$(CXX)
$(LIBPATHS)
-Xlinker
"-("
$^
-Wl
,-Bstatic
$(STATIC_LINKINGS)
-Wl
,-Bdynamic
-Xlinker
"-)"
$(DYNAMIC_LINKINGS)
-o
$@
%.o
:
%.cpp
%.o
:
%.cpp
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
%.o
:
%.cc
%.o
:
%.cc
@
echo
"Compiling
$@
"
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(
INCPATH
)
$(CXXFLAGS)
$<
-o
$@
@
$(CXX)
-c
$(
HDRPATHS
)
$(CXXFLAGS)
$<
-o
$@
tools/trackme_server/trackme_server.cpp
View file @
0630ae1e
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 baidu-rpc authors.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// If you have any problem, contact us:
// you may not use this file except in compliance with the License.
// Baidu Hi : group 1296497
// You may obtain a copy of the License at
// Email : pbrpc@baidu.com
//
// Wiki : http://wiki.baidu.com/display/RPC/baidu-rpc
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// A server to receive TrackMeRequest and send back TrackMeResponse.
// A server to receive TrackMeRequest and send back TrackMeResponse.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment