Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
58c927ce
Commit
58c927ce
authored
9 years ago
by
Hongyu Chen
Browse files
Options
Downloads
Patches
Plain Diff
Make census_filter more of a noop.
parent
3c9b8739
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/channel/census_filter.c
+2
-21
2 additions, 21 deletions
src/core/channel/census_filter.c
with
2 additions
and
21 deletions
src/core/channel/census_filter.c
+
2
−
21
View file @
58c927ce
...
@@ -135,18 +135,8 @@ static void client_init_call_elem(grpc_call_element* elem,
...
@@ -135,18 +135,8 @@ static void client_init_call_elem(grpc_call_element* elem,
static
void
client_destroy_call_elem
(
grpc_call_element
*
elem
)
{
static
void
client_destroy_call_elem
(
grpc_call_element
*
elem
)
{
call_data
*
d
=
elem
->
call_data
;
call_data
*
d
=
elem
->
call_data
;
census_stat
stats
[
3
];
GPR_ASSERT
(
d
!=
NULL
);
GPR_ASSERT
(
d
!=
NULL
);
stats
[
0
].
id
=
CENSUS_RPC_CLIENT_REQUESTS
;
/* TODO(hongyu): record rpc client stats and census_rpc_end_op here */
stats
[
0
].
value
=
1
.
0
;
stats
[
1
].
id
=
CENSUS_RPC_CLIENT_ERRORS
;
stats
[
1
].
value
=
0
.
0
;
/* TODO(hongyu): add rpc error recording */
stats
[
2
].
id
=
CENSUS_RPC_CLIENT_LATENCY
;
/* Temporarily using census_filter invoke time as the start time of rpc. */
stats
[
2
].
value
=
gpr_timespec_to_micros
(
gpr_time_sub
(
gpr_now
(
GPR_CLOCK_REALTIME
),
d
->
start_ts
));
census_record_stat
(
d
->
ctxt
,
stats
,
3
);
/* TODO(hongyu): call census_rpc_end_op here */
}
}
static
void
server_init_call_elem
(
grpc_call_element
*
elem
,
static
void
server_init_call_elem
(
grpc_call_element
*
elem
,
...
@@ -162,17 +152,8 @@ static void server_init_call_elem(grpc_call_element* elem,
...
@@ -162,17 +152,8 @@ static void server_init_call_elem(grpc_call_element* elem,
static
void
server_destroy_call_elem
(
grpc_call_element
*
elem
)
{
static
void
server_destroy_call_elem
(
grpc_call_element
*
elem
)
{
call_data
*
d
=
elem
->
call_data
;
call_data
*
d
=
elem
->
call_data
;
census_stat
stats
[
3
];
GPR_ASSERT
(
d
!=
NULL
);
GPR_ASSERT
(
d
!=
NULL
);
stats
[
0
].
id
=
CENSUS_RPC_SERVER_REQUESTS
;
/* TODO(hongyu): record rpc server stats and census_tracing_end_op here */
stats
[
0
].
value
=
1
.
0
;
stats
[
1
].
id
=
CENSUS_RPC_SERVER_ERRORS
;
stats
[
1
].
value
=
0
.
0
;
stats
[
2
].
id
=
CENSUS_RPC_SERVER_LATENCY
;
stats
[
2
].
value
=
gpr_timespec_to_micros
(
gpr_time_sub
(
gpr_now
(
GPR_CLOCK_REALTIME
),
d
->
start_ts
));
census_record_stat
(
d
->
ctxt
,
stats
,
3
);
/* TODO(hongyu): call census_tracing_end_op here */
}
}
static
void
init_channel_elem
(
grpc_channel_element
*
elem
,
grpc_channel
*
master
,
static
void
init_channel_elem
(
grpc_channel_element
*
elem
,
grpc_channel
*
master
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment