Closed Bug 1461001 Opened 2 years ago Closed 2 years ago

Implement frontend for console.timeLog


(DevTools :: Console, enhancement)

Not set


(firefox62 fixed)

Firefox 62
Tracking Status
firefox62 --- fixed


(Reporter: bgrins, Assigned: nchevobbe)



(Keywords: dev-doc-complete)


(1 file)

The platform handling is being added in Bug 1458466. We'll need to add a stub for the API call and then render basically the same message we render for timeEnd.
Nicolas: is this something you think we'll have bandwidth to take in 62? It seems like this'll be a simple frontend change, but I want to make sure we ship the frontend part in the same release where we land the platform part.
Flags: needinfo?(nchevobbe)
It seems like a small thing to me, and I'm almost 100% positive it can be done in 62
Flags: needinfo?(nchevobbe)
Should we have different output between timeLog and timeEnd ?
I know that timeLog can have multiple arguments to clarify what call it refers to, but if none provided, it's a bit hard to follow what's going on.

The following code: 


will output: 

> 14:12:46.661 bar: 1ms debugger eval code:2:1
> 14:12:46.662 bar: 2ms debugger eval code:3:1
> 14:12:46.663 bar: 3ms debugger eval code:4:1 

I feel like the timeEnd should have either a different label, or an icon or something that indicate that it _is_ the timeEnd.
Comment on attachment 8979294 [details]
Bug 1461001 - Implement frontend for console.timeLog; .

::: devtools/client/webconsole/utils/messages.js:109
(Diff revision 1)
>        } else {
>          // We don't show anything for console.time calls to match Chrome's behaviour.
>          type = MESSAGE_TYPE.NULL_MESSAGE;
>        }
>        break;
> +    case "timeLog":

Nit: given the amount of code / comments shared between them, I'd rather collapse timeLog and timeEnd into the same `case` and have a condition inside of the else if that sets `parameters` in one case and `messageText` in the other. Up to you.
Attachment #8979294 - Flags: review?(bgrinstead) → review+
Assignee: nobody → nchevobbe
Pushed by
Implement frontend for console.timeLog; r=bgrins.
Blocks: 1463347
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Keywords: dev-doc-needed
Product: Firefox → DevTools
Added a new page to:
Flags: needinfo?(nchevobbe)
(In reply to Irene Smith from comment #10)
> Added a new page to:

thanks Irene, that looks good.
Do you plan to update the example you point to ([1]), since it does not have a `console.timeLog(timer)` line in it ?

Flags: needinfo?(nchevobbe)
Thank you for the reminder. I will update that later this afternoon.
The actual page is located here:

I had the wrong location to begin with and had to move it.

I have updated the example here:
You need to log in before you can comment on or make changes to this bug.