• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jlfwong / speedscope / 788
47%

Build:
DEFAULT BRANCH: master
Ran 05 Aug 2020 07:49AM UTC
Jobs 4
Files 73
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
788

push

travis-ci

web-flow
Add patch to fix accumulated negative deltas (#305)

## Context

Hi! I'm working on an experimental React [concurrent mode profiler](https://react-scheduling-profiler.vercel.app) in partnership with the React core team, and we're using a [custom build of Speedscope](https://github.com/taneliang/speedscope/compare/master...taneliang:fork-for-scheduling-profiler) that exposes Speedscope's internals to support our custom flamechart rendering. Specifically, Speedscope is used to import and process Chrome profiles, which are then fed to our rendering code that draws everything to a canvas.

Here's a screenshot of our app for context. The stuff above the thick gray bar is React data (some React Fiber lanes, React events, and other user timing marks), and a flamechart is drawn below.

![image](https://user-images.githubusercontent.com/12784593/89261576-e2e3b600-d660-11ea-9b90-6c6991d061d6.png)

## Problem

Early on, we had [an issue](https://github.com/MLH-Fellowship/scheduling-profiler-prototype/issues/42) where our flamechart was not aligned with the React data. The discrepancy between the flamechart frames and our React data grew over the time of the profile.

We tracked down the cause to https://github.com/jlfwong/speedscope/pull/80, which resolves https://github.com/jlfwong/speedscope/issues/70. It seems like zeroing out those negative time deltas resulted in the accumulation of errors over the time of these profiles, which resulted in the very visible misalignment in our profiler.

I am confident that the React data's timestamps are correct because they are obtained from User Timing marks, which have absolute timestamps and are thus independent of any `timeDelta` stuff. This would mean that Speedscope is likely displaying incorrect timestamps for Chrome profiles.

## Solution

This PR takes a different approach to solving the negative `timeDelta` problem: we add a `lastElapsed` variable as a sort of backstop, preventing `elapsed` from... (continued)

959 of 2358 branches covered (40.67%)

Branch coverage included in aggregate %.

10 of 10 new or added lines in 1 file covered. (100.0%)

2587 of 5213 relevant lines covered (49.63%)

23642.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 788.1 05 Aug 2020 07:49AM UTC 0
46.74
Travis Job 788.1
2 788.2 05 Aug 2020 07:49AM UTC 0
46.72
Travis Job 788.2
3 788.3 05 Aug 2020 07:49AM UTC 0
46.72
Travis Job 788.3
4 788.4 05 Aug 2020 07:49AM UTC 0
46.8
Travis Job 788.4
Source Files on build 788
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #788
  • a0b3fe84 on github
  • Prev Build on master (#787)
  • Next Build on master (#789)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc