Closed Bug 1394792 Opened 7 years ago Closed 7 years ago

stylo: Add gtest microbenchmark for Servo_DeclarationBlock_GetPropertyValueById

Categories

(Core :: CSS Parsing and Computation, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: SimonSapin, Assigned: SimonSapin)

References

Details

Attachments

(1 file)

      No description provided.
Comment on attachment 8902244 [details]
Bug 1394792 - Add gtest microbenchmark for Servo_DeclarationBlock_GetPropertyValueById.

https://reviewboard.mozilla.org/r/173774/#review179046

::: layout/style/test/gtest/StyloParsingBench.cpp:115
(Diff revision 1)
> +    nullptr
> +  );
> +
> +  for (int i = 0; i < GETPROPERTY_REPETITIONS; i++) {
> +    DOMString value_;
> +    nsAString& value = value_;

I guess this is done to make it more similar to the DOM profile, right?

Otherwise we can use `nsAutoString` or something like that.

::: layout/style/test/gtest/StyloParsingBench.cpp:120
(Diff revision 1)
> +    nsAString& value = value_;
> +    Servo_DeclarationBlock_GetPropertyValueById(
> +      block,
> +      eCSSProperty_width,
> +      &value
> +    );

`MOZ_ASSERT(value.EqualsLiteral("10px"))`? (not sure if worth)
Attachment #8902244 - Flags: review?(emilio) → review+
Comment on attachment 8902244 [details]
Bug 1394792 - Add gtest microbenchmark for Servo_DeclarationBlock_GetPropertyValueById.

https://reviewboard.mozilla.org/r/173774/#review179046

> I guess this is done to make it more similar to the DOM profile, right?
> 
> Otherwise we can use `nsAutoString` or something like that.

It’s rather the first thing I found when looking up callers to get something to compile at all, but yeah that too.
Pushed by simon.sapin@exyr.org:
https://hg.mozilla.org/integration/autoland/rev/f0039e9a1276
Add gtest microbenchmark for Servo_DeclarationBlock_GetPropertyValueById. r=emilio
Priority: -- → P5
https://hg.mozilla.org/mozilla-central/rev/f0039e9a1276
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Assignee: nobody → simon.sapin
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: