Skip to content
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

Bring up profiler in response to user enabling it #2683

Merged
merged 9 commits into from
Jan 31, 2023

Conversation

johnoliver
Copy link
Member

Fix # .

For significant contributions please make sure you have completed the following items:

  • Design discussion issue #
  • Changes in public surface reviewed
  • CHANGELOG.md updated

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Member

@karianna karianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@karianna
Copy link
Member

@johnoliver

DiagnosticExtensionTest$Java8Test > doDelayedDiagnosticExtensionTest() FAILED
    org.opentest4j.AssertionFailedError: expected: <true> but was: <false>

@@ -397,7 +407,7 @@ protected Set<Integer> getLivenessCheckPorts() {
"-Dapplicationinsights.testing.global-ingestion-endpoint=" + FAKE_INGESTION_ENDPOINT);
}
if (REMOTE_DEBUG) {
javaToolOptions.add("-agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=y");
javaToolOptions.add("-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=y");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this needed on linux? ;-)

static class JavaProfilerConfiguredTest extends JavaProfileConfigTest {
@RegisterExtension
static final SmokeTestExtension testing =
BASE_BUILDER.setProfilerEndpoint(ProfilerState.configuredEnabled).build();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest something like below, and construct the baseBuilder each time (since it's not immutable):

Suggested change
BASE_BUILDER.setProfilerEndpoint(ProfilerState.configuredEnabled).build();
baseBuilder().setProfilerEndpoint(ProfilerState.configuredEnabled).build();

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MockedProfilerSettingsServlet extends HttpServlet {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️❤️

@trask trask merged commit c3d27c0 into microsoft:main Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants