-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Issue 596: Add profiler path to configuration #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6a3b748
Update handlerCpuProfiler and add profiler_path
hennna 2059a8b
Clean up profiler and admin_test files
hennna 45eeba9
Fix address asan build fail in Cpu::startProfiler()
hennna f9968bb
Clean up profiler and admin_test files v2
hennna 9e3ae3d
Edit addressing comments
hennna a92b095
Merge remote-tracking branch 'upstream/master' into issue-596
hennna 0aa7ac9
Allow admin profile_path JSON configurability
hennna 8dd2764
Address comments for JSON configurability
hennna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,28 +105,34 @@ TEST_F(IntegrationTest, Admin) { | |
| EXPECT_TRUE(response->complete()); | ||
| EXPECT_STREQ("400", response->headers().Status()->value().c_str()); | ||
|
|
||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/cpuprofiler?enable=y", "", | ||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/hot_restart_version", "", | ||
| Http::CodecClient::Type::HTTP1); | ||
| EXPECT_TRUE(response->complete()); | ||
| EXPECT_STREQ("200", response->headers().Status()->value().c_str()); | ||
|
|
||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/cpuprofiler?enable=n", "", | ||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/reset_counters", "", | ||
| Http::CodecClient::Type::HTTP1); | ||
| EXPECT_TRUE(response->complete()); | ||
| EXPECT_STREQ("200", response->headers().Status()->value().c_str()); | ||
|
|
||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/hot_restart_version", "", | ||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/certs", "", | ||
| Http::CodecClient::Type::HTTP1); | ||
| EXPECT_TRUE(response->complete()); | ||
| EXPECT_STREQ("200", response->headers().Status()->value().c_str()); | ||
| } | ||
|
|
||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/reset_counters", "", | ||
| Http::CodecClient::Type::HTTP1); | ||
| // Successful call to startProfiler requires tcmalloc. | ||
| #ifdef TCMALLOC | ||
|
|
||
| TEST_F(IntegrationTest, AdminCpuProfilerStart) { | ||
| BufferingStreamDecoderPtr response = IntegrationUtil::makeSingleRequest( | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you meant to move this request ("/") inside here. Should go back in other section. |
||
| ADMIN_PORT, "GET", "/cpuprofiler?enable=y", "", Http::CodecClient::Type::HTTP1); | ||
| EXPECT_TRUE(response->complete()); | ||
| EXPECT_STREQ("200", response->headers().Status()->value().c_str()); | ||
|
|
||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/certs", "", | ||
| response = IntegrationUtil::makeSingleRequest(ADMIN_PORT, "GET", "/cpuprofiler?enable=n", "", | ||
| Http::CodecClient::Type::HTTP1); | ||
| EXPECT_TRUE(response->complete()); | ||
| EXPECT_STREQ("200", response->headers().Status()->value().c_str()); | ||
| } | ||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on with all these handler path changes? They don't seem related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the two enable=y and enable=n into it's own integration test called AdminCpuProfilerStart. I think this has to do with line order changes.