Closed
      
        Bug 1461001
      
      
        Opened 7 years ago
          Closed 7 years ago
      
        
    
  
Implement frontend for console.timeLog  
    Categories
(DevTools :: Console, enhancement)
        DevTools
          
        
        
      
        
    
        Console
          
        
        
      
        
    Tracking
(firefox62 fixed)
        RESOLVED
        FIXED
        
    
  
        
            Firefox 62
        
    
  
| Tracking | Status | |
|---|---|---|
| firefox62 | --- | fixed | 
People
(Reporter: bgrins, Assigned: nchevobbe)
References
Details
(Keywords: dev-doc-complete)
Attachments
(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.
| Reporter | ||
| Comment 1•7 years ago
           | ||
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)
| Assignee | ||
| Comment 2•7 years ago
           | ||
It seems like a small thing to me, and I'm almost 100% positive it can be done in 62
Flags: needinfo?(nchevobbe)
| Assignee | ||
| Comment 3•7 years ago
           | ||
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: 
```js
console.time("bar");
console.timeLog("bar");
console.timeLog("bar");
console.timeEnd("bar");
```
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 hidden (mozreview-request) | 
| Reporter | ||
| Comment 5•7 years ago
           | ||
| mozreview-review | ||
Comment on attachment 8979294 [details]
Bug 1461001 - Implement frontend for console.timeLog; .
https://reviewboard.mozilla.org/r/245482/#review251472
::: 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+
| Comment hidden (mozreview-request) | 
| Comment hidden (mozreview-request) | 
| Assignee | ||
| Updated•7 years ago
           | 
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d441f5a05fbc
Implement frontend for console.timeLog; r=bgrins.
|   | ||
| Comment 9•7 years ago
           | ||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
| Assignee | ||
| Updated•7 years ago
           | 
Keywords: dev-doc-needed
| Updated•7 years ago
           | 
Product: Firefox → DevTools
|   | ||
| Comment 10•7 years ago
           | ||
Added a new page to: https://developer.mozilla.org/en-US/docs/Web/API/Console/Console.timeLog()
Flags: needinfo?(nchevobbe)
| Assignee | ||
| Comment 11•7 years ago
           | ||
(In reply to Irene Smith from comment #10)
> Added a new page to:
> https://developer.mozilla.org/en-US/docs/Web/API/Console/Console.timeLog()
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 ?
[1] https://developer.mozilla.org/en-US/docs/Web/API/console#Timers
Flags: needinfo?(nchevobbe)
|   | ||
| Comment 12•7 years ago
           | ||
Thank you for the reminder. I will update that later this afternoon.
|   | ||
| Comment 13•7 years ago
           | ||
The actual page is located here: https://developer.mozilla.org/en-US/docs/Web/API/Console/timeLog
I had the wrong location to begin with and had to move it.
I have updated the example here: https://developer.mozilla.org/en-US/docs/Web/API/Console
Keywords: dev-doc-needed → dev-doc-complete
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•