Commit graph

59 commits

Author SHA1 Message Date
ddh
2ffbe53989 added time to interactive metrics, refactored metrics to use traits
changed task macro to take pipeline info
2017-10-24 21:02:56 +01:00
Fernando Jiménez Moreno
fb843c251a Make Performance Timeline API work in Workers 2017-09-05 17:07:15 +02:00
bors-servo
7dcd3ae50d Auto merge of #18351 - mateon1:profile-sort_by-partial_cmp, r=emilio
Refactor `.sort_by()` calls to use `.partial_cmp()`

Changes the closures passed to `sort_by` in this file with a simpler, and more correct version.

Previously, potential NaNs in the array would float to the top. Either way, the program would crash, as the `get_statistics` function asserts the array it gets is sorted, which always fails with a NaN.
Because of that, this change should not affect functionality.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because statistics collected by --profile should not have NaN values in the first place.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18351)
<!-- Reviewable:end -->
2017-09-02 03:54:49 -05:00
Mateusz Naściszewski
699681d800
Refactor .sort_by() calls to use .partial_cmp() 2017-09-01 22:34:46 +02:00
Mateusz Naściszewski
1c0f569bb3
Correct sortedness check in profile statistics 2017-08-28 13:17:26 +02:00
Fernando Jiménez Moreno
892b30edca Implement basic Time To First Paint and First Contentful Paint PWMs 2017-07-20 15:41:21 +02:00
Fernando Jiménez Moreno
360f2cc492 Add option to write profiler output to InfluxDB 2017-07-03 10:13:46 +02:00
Alan Jeffrey
af8436c9be Implemented Houdini worklets. 2017-05-17 09:01:05 -05:00
Nick Fitzgerald
9ef436cf8e Move trace file opening into TraceDump::new
Moves the responsibility of opening the trace file into TraceDump::new, so that
it doesn't need to be repeated at every call site.
2017-03-31 14:47:29 -07:00
Imanol Fernandez
c5705bff50 WebVR API Implementation, r=larsbergstrom 2017-01-09 12:44:39 +01:00
Julien Levesy
b78979d692 replace match by if let statements if possible 2016-12-31 12:34:05 +01:00
Emilio Cobos Álvarez
ed87fcf6cf
profile: Simplify profiler's find or insert code. 2016-12-25 19:18:35 +01:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Jansen Jan
55f0e56224 Add support for fullscreen #10102 2016-12-09 11:45:50 +01:00
Anthony Ramine
609299e1e4 Add time profiling to ServoXMLParser::parse_sync 2016-10-11 15:03:25 +02:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Malisa Smith
1a1d8daede added spaces around - sign 2016-07-07 13:29:58 -07:00
Malisa Smith
854cb5839f added comment to profiler get_statistics function 2016-07-07 13:19:45 -07:00
Malisa Smith
e1092b8b1d simplifying min and max calculation for profiler get_statistics function 2016-07-07 13:08:20 -07:00
Malisa Smith
7dccf09ff6 added test and assertion that profiler statistics data must be sorted 2016-07-07 12:59:16 -07:00
Jeena Lee
d47b769cf7 Add test for Profiler::get_statistics, and remove empty space around Profiler::get_statistics.
Profiler::get_statistics calculates mean, median, min, and max for a given vector of data. This commit adds a test for the calculated statistics.
2016-07-07 11:00:56 -07:00
Malisa Smith
6230911330 separate profiler statistics calculation to its own function 2016-07-07 10:18:10 -07:00
Anthony Ramine
5a576e873e Move util::time::duration_from_seconds to profile::time 2016-06-29 18:00:24 +02:00
Rahul Sharma
15a2064c0d implement related sw interface and register method 2016-06-02 04:09:39 +05:30
Patrick Walton
a86f77e36d script: Keep the DOM-side viewport up to date when scrolling happens in
WebRender.

This happens asynchronously, just as it does in non-WebRender mode.

This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.

Requires servo/webrender_traits#55 and servo/webrender#277.

Partially addresses #11108.
2016-05-31 14:12:51 -07:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Rohit Zambre
7591e1327a replacing commas with tabs; changing from CSV to TSV profiling 2016-05-19 15:07:18 -07:00
Josh Matthews
9e8cf19e51 Add timeline markers for HTTP requests, JS evaluation, and HTML parsing. 2016-05-18 08:02:42 -05:00
Matt Brubeck
d560ae79b4 Fix some warnings 2016-05-11 21:03:12 -07:00
Rohit Zambre
ca3084d241 added infrastructure to handle interval and CSV time profiling alongside html-timeline-profiling 2016-05-11 11:27:07 -07:00
Matt Brubeck
c4f9576368 Make --profile-trace-path work without -p 2016-05-10 14:03:10 -07:00
Matt Brubeck
9b23cf537e Profile time spent saving the screenshot image 2016-05-09 09:43:13 -07:00
Nick Fitzgerald
9fbb5c720e Add a method for dumping self-contained HTML timeline profiles
This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a gant-chart style
timeline.
2016-04-27 18:35:17 -07:00
Nick Fitzgerald
1997d034fa Take the stdout lock when printing profile data
Acquiring the stdout lock while printing the profile data prevents other
messages printed to stdout from being interleaved with prints from elsewhere.
2016-04-14 12:28:00 -07:00
Patrick Walton
b29719e36b layout: Rewrite the block formatting context/float inline-size
speculation code.

The old code tried to do the speculation as a single bottom-up pass
after intrinsic inline-size calculation, which was unable to handle
cases like this:

    <div>
        <div style="float: left">Foo</div>
    </div>
    <div>
        <div style="overflow: hidden">Bar</div>
    </div>

No single bottom-up pass could possibly handle this case, because the
inline-size of the float flowing out of the "Foo" block could never make
it down to the "Bar" block, where it is needed for speculation.

On the pages I tried, this regresses layout performance by 1%-2%.

I first noticed this breaking some pages, like the Google SERPs, several
months ago.
2016-03-25 18:39:16 -07:00
Patrick Walton
5ea8c34276 layout: Move overflow calculation to be a separate, sequential,
bottom-up pass.

Right now, the only reason that overflow calculation works is that we
rely on script inducing extra reflows that are sent for display. This
was preventing #10021 from landing.

This change regresses layout performance by about 1% in my tests.

Fixes #7797 properly.
2016-03-18 22:11:51 -07:00
Martin Robinson
e7019f2721 Flatten display list structure
Instead of producing a tree of stacking contexts, display list
generation now produces a flat list of display items and a tree of
stacking contexts. This will eventually allow display list construction
to produce and modify WebRender vertex buffers directly, removing the
overhead of display list conversion.  This change also moves
layerization of the display list to the paint thread, since it isn't
currently useful for WebRender.

To accomplish this, display list generation now takes three passes of
the flow tree:

        1. Calculation of absolute positions.
        2. Collection of a tree of stacking contexts.
        3. Creation of a list of display items.

After collection of display items, they are sorted based upon the index
of their parent stacking contexts and their position in CSS 2.1
Appendeix E stacking order.

This is a big change, but it actually simplifies display list generation.
2016-03-01 14:50:07 -08:00
Keith Yeung
ace5b7a2e8 Implement planned navigation 2016-02-18 06:37:32 -05:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
Patrick Walton
df93b1f194 gfx: Measure text shaping time in the time profiler. 2015-12-15 13:28:05 -08:00
James Sanders
3659218c59 Use thread::sleep instead of deprecated sleep_ms
Similarly, change one instance of `thread::park_timeout_ms`.

Fixes #8694
2015-11-29 13:41:04 -07:00
Patrick Walton
1c130819ca compositing: Split Servo up into multiple sandboxed processes.
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.
2015-11-19 16:38:04 -05:00
benshu
7623e89506 Execute XHR timeout callbacks directly. (Fixes #8468.) 2015-11-11 23:12:07 +01:00
Ms2ger
ff0acccc06 Consolidate ProfilerMetadata and TimerMetadata.
There is no good reason to have the two types.

This also means that the result of LayoutTask::profiler_metadata no longer
borrows the LayoutTask, which I'll need later.
2015-11-09 09:03:50 +01:00
benshu
553a0dbefd Timers are scheduled by a dedicated per-constellation thread. 2015-10-21 16:40:49 +02:00
Corey Farwell
20beaf5af3 Fix issues found by rust-clippy 2015-10-12 20:21:49 -04:00
Connor Imes
3c25f47dbc Add energy monitoring and characterization scripts 2015-09-09 13:35:21 -05:00
Connor Imes
d746835344 Combine script profiling with profile crates. Fixes #7514. 2015-09-04 16:09:44 -05:00
Simon Sapin
40b4348824 Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01) 2015-09-02 09:22:17 +02:00