forked from ChromeDevTools/devtools-frontend
-
Notifications
You must be signed in to change notification settings - Fork 8
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
New home for reliability metrics #10
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Meta Platforms, Inc. and affiliates. | ||
// Copyright 2024 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import {type ReactNativeChromeDevToolsEvent} from './generated/type_defs/ReactNativeChromeDevToolsEventTypes.js'; | ||
|
||
type RNReliabilityMetrics = { | ||
sendEvent: (event: ReactNativeChromeDevToolsEvent) => void, | ||
}; | ||
|
||
export const RNReliabilityMetrics = ((): RNReliabilityMetrics => { | ||
function sendEvent(_event: ReactNativeChromeDevToolsEvent): void { | ||
} | ||
|
||
return { | ||
sendEvent, | ||
}; | ||
})(); | ||
36 changes: 36 additions & 0 deletions
36
...nd/core/react_native/generated/type_defs/ReactNativeChromeDevToolsDebuggerEventTypes.d.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* Copyright 2024 The Chromium Authors. All rights reserved. | ||
* Use of this source code is governed by a BSD-style license that can be | ||
* found in the LICENSE file. | ||
* | ||
* @generated by xplat/js/react-native-github/scripts/debugger-frontend/gen-type-defs.js | ||
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. Whats the latest on that? Will we sync these files manually for now? 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. |
||
*/ | ||
|
||
export type SetBreakpointEventEntryPoint = | ||
| "fileGutterClicked" | ||
| "savedStateRestored"; | ||
export type SetBreakpointEventType = | ||
| "logpoint" | ||
| "unconditionalBreakpoint" | ||
| "conditionalBreakpoint"; | ||
export type SetBreakpointRequestEvent = Readonly<{ | ||
event: "Debugger.SetBreakpoint.Request"; | ||
params: Readonly<{ | ||
entryPoint: SetBreakpointEventEntryPoint; | ||
requestID: string; | ||
type: SetBreakpointEventType; | ||
}>; | ||
}>; | ||
export type SetBreakpointResponseEvent = Readonly<{ | ||
event: "Debugger.SetBreakpoint.Response"; | ||
params: Readonly<{ breakpointID: string; requestID: string }>; | ||
}>; | ||
export type BreakpointResolvedEvent = Readonly<{ | ||
event: "Debugger.BreakpointResolved"; | ||
params: Readonly<{ breakpointID: string }>; | ||
}>; | ||
export type DebuggerPausedEvent = Readonly<{ | ||
event: "Debugger.Paused"; | ||
params: Readonly<{ breakpointID: null | undefined | string }>; | ||
}>; |
20 changes: 20 additions & 0 deletions
20
front_end/core/react_native/generated/type_defs/ReactNativeChromeDevToolsEventTypes.d.ts
This file contains 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* Copyright 2024 The Chromium Authors. All rights reserved. | ||
* Use of this source code is governed by a BSD-style license that can be | ||
* found in the LICENSE file. | ||
* | ||
* @generated by xplat/js/react-native-github/scripts/debugger-frontend/gen-type-defs.js | ||
*/ | ||
|
||
import type { | ||
BreakpointResolvedEvent, | ||
DebuggerPausedEvent, | ||
SetBreakpointRequestEvent, | ||
SetBreakpointResponseEvent, | ||
} from "ReactNativeChromeDevToolsDebuggerEventTypes"; | ||
export type ReactNativeChromeDevToolsEvent = | ||
| SetBreakpointRequestEvent | ||
| SetBreakpointResponseEvent | ||
| BreakpointResolvedEvent | ||
| DebuggerPausedEvent; |
This file contains 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
Oops, something went wrong.
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.
Why not
?
Also, reusing the exact same name for a type and value seems problematic.
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.
Also: How are we going to actually inject a
sendEvent
handler here?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.
This plan was for this to be a pub/sub API, so sending the actual events won't be here:
EdmondChuiHW@ecf72b6#diff-c62722ca9646ac9ec9e205faf447976c33eccbea2ce1a39791bf6f95d5041233R17
The closure style is my muscle memory for private variables + singleton; I will change it to a class + instance export instead as JS has real private fields now.
Will rework this PR to focus only on what are Reliability Metrics, how are safe defaults included, and the actual listener wiring (similar to facebook/react#22276)