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
2fcf211b
Commit
2fcf211b
authored
8 years ago
by
Craig Tiller
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #9947 from ctiller/track_memory
Track memory as part of microbenchmark profiling runs
parents
56d048d4
19e6b88a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/core/memory_usage/client.c
+24
-0
24 additions, 0 deletions
test/core/memory_usage/client.c
tools/profiling/latency_profile/run_latency_profile.sh
+5
-0
5 additions, 0 deletions
tools/profiling/latency_profile/run_latency_profile.sh
with
29 additions
and
0 deletions
test/core/memory_usage/client.c
+
24
−
0
View file @
2fcf211b
...
...
@@ -43,6 +43,7 @@
#include
<grpc/support/log.h>
#include
<grpc/support/time.h>
#include
<grpc/support/useful.h>
#include
"src/core/lib/support/env.h"
#include
"src/core/lib/support/string.h"
#include
"test/core/util/memory_counters.h"
#include
"test/core/util/test_config.h"
...
...
@@ -310,6 +311,29 @@ int main(int argc, char **argv) {
server_calls_end
.
total_size_relative
-
after_server_create
.
total_size_relative
);
const
char
*
csv_file
=
"memory_usage.csv"
;
FILE
*
csv
=
fopen
(
csv_file
,
"w"
);
if
(
csv
)
{
char
*
env_build
=
gpr_getenv
(
"BUILD_NUMBER"
);
char
*
env_job
=
gpr_getenv
(
"JOB_NAME"
);
fprintf
(
csv
,
"%f,%zi,%zi,%f,%zi,%s,%s
\n
"
,
(
double
)(
client_calls_inflight
.
total_size_relative
-
client_benchmark_calls_start
.
total_size_relative
)
/
benchmark_iterations
,
client_channel_end
.
total_size_relative
-
client_channel_start
.
total_size_relative
,
after_server_create
.
total_size_relative
-
before_server_create
.
total_size_relative
,
(
double
)(
server_calls_inflight
.
total_size_relative
-
server_benchmark_calls_start
.
total_size_relative
)
/
benchmark_iterations
,
server_calls_end
.
total_size_relative
-
after_server_create
.
total_size_relative
,
env_build
==
NULL
?
""
:
env_build
,
env_job
==
NULL
?
""
:
env_job
);
fclose
(
csv
);
gpr_log
(
GPR_INFO
,
"Summary written to %s"
,
csv_file
);
}
grpc_memory_counters_destroy
();
return
0
;
}
This diff is collapsed.
Click to expand it.
tools/profiling/latency_profile/run_latency_profile.sh
+
5
−
0
View file @
2fcf211b
...
...
@@ -44,4 +44,9 @@ else
PYTHON
=
python2.7
fi
make
CONFIG
=
opt memory_profile_test memory_profile_client memory_profile_server
bins/opt/memory_profile_test
bq load microbenchmarks.memory memory_usage.csv
$PYTHON
tools/run_tests/run_microbenchmark.py
--collect
summary perf latency
--bigquery_upload
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