bool has_recorded_tokenization_time_ = false;
nit: Blink style prefers to precede boolean member variables with verbs like 'is' or 'did'. For consistency with other booleans in this class (e.g., `did_pump_tokenizer_`), please consider renaming this to `is_tokenization_time_recorded_` or `did_record_tokenization_time_`. (Blink Style Guide: Naming - Precede boolean values with words like βisβ and βdidβ)
_To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason
This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent).AI reviews can sometimes be inaccurate; We appreciate your π feedback π to help us improve.[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
nit: Blink style prefers to precede boolean member variables with verbs like 'is' or 'did'. For consistency with other booleans in this class (e.g., `did_pump_tokenizer_`), please consider renaming this to `is_tokenization_time_recorded_` or `did_record_tokenization_time_`. (Blink Style Guide: Naming - Precede boolean values with words like βisβ and βdidβ)
_To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reasonThis comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent).AI reviews can sometimes be inaccurate; We appreciate your π feedback π to help us improve.[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Mason: Would you mind taking a look?
I'm a bit worried about doing this in the hot path. Would you watch out for the speedometer metrics after landing this?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
LGTM with some small suggestions and questions.
base::ElapsedTimer timer;
Does this timer source have the resolution needed to measure very short calls like `NextToken` accurately?
<histogram name="Blink.HTMLParsing.TokenizationTime.MainDocument" units="ms"
This is a total time - would it be worth measuring the tokenization time as a percentage of the total parsing time, also?
The total wall time spent in the tokenization phase for the main document's
HTML. Tokenization is the process of converting the raw HTML text into a
This measures not just main document HTML though, right? It also measures tokenization from synchronous parsing like `innerHTML`, in the case that the fast-path html parser rejects the HTML. It's likely worth mentioning that. Perhaps better is just "all tokenization done by the HTMLDocumentParser" or something like that?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |