mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Bug 1650336 - Add the session id to the WebconsoleAddMessages marker label r=nchevobbe
An issue with the current approach is that labels are a bit too big for the marker chart sidebar in the profiler UI. An issue was filed to address this at https://github.com/firefox-devtools/profiler/issues/2638 Differential Revision: https://phabricator.services.mozilla.com/D82772
This commit is contained in:
parent
77c7ad6ffa
commit
7b9705ac23
@ -13,7 +13,7 @@ const { Cu } = require("chrome");
|
||||
* Performance marker middleware is responsible for recording markers visible
|
||||
* performance profiles.
|
||||
*/
|
||||
function performanceMarkerMiddleware(store) {
|
||||
function performanceMarkerMiddleware(sessionId, store) {
|
||||
return next => action => {
|
||||
const shouldAddProfileMarker = action.type === MESSAGES_ADD;
|
||||
|
||||
@ -25,7 +25,7 @@ function performanceMarkerMiddleware(store) {
|
||||
const { messages } = action;
|
||||
const totalMessageCount = store.getState().messages.messagesById.size;
|
||||
ChromeUtils.addProfilerMarker(
|
||||
"WebconsoleAddMessages",
|
||||
`WebconsoleAddMessages (${sessionId})`,
|
||||
startTime,
|
||||
`${messages.length} messages handled, store now has ${totalMessageCount} messages`
|
||||
);
|
||||
|
@ -95,7 +95,7 @@ function configureStore(webConsoleUI, options = {}) {
|
||||
const { toolbox } = options.thunkArgs;
|
||||
const sessionId = (toolbox && toolbox.sessionId) || -1;
|
||||
const middleware = applyMiddleware(
|
||||
performanceMarker,
|
||||
performanceMarker.bind(null, sessionId),
|
||||
ignore,
|
||||
thunkWithOptions.bind(null, {
|
||||
prefsService,
|
||||
|
Loading…
Reference in New Issue
Block a user