Skip to content

Instantly share code, notes, and snippets.

View jimmyoneill's full-sized avatar

Jimmy O'Neill jimmyoneill

  • Airbnb
  • San Francisco
View GitHub Profile
def calculateOwnTime(rootSpan, fetchSpans):
ownTime = 0
maxEndTimeSoFar = rootSpan.startTime
sortedFetchSpans = fetchSpans sorted by increasing start-time
for fetchSpan in sortedFetchSpans:
if (maxEndTimeSoFar < fetchSpan.startTime)
ownTime += (fetchSpan.startTime - maxEndTimeSoFar)
maxEndTimeSoFar = max(maxEndTimeSoFar, fetchSpan.endTime)
ownTime += (rootSpan.endTime - maxEndTimeSoFar)
return ownTime

Keybase proof

I hereby claim:

  • I am jimmyoneill on github.
  • I am jimmy (https://keybase.io/jimmy) on keybase.
  • I have a public key whose fingerprint is 9705 CAFF 0F6D 5B7A 85C9 C830 EC99 8D8A 6547 5175

To claim this, I am signing this object:

[5/3/13 10:20:16 AM] Jimmy O'Neill: [4/26/13 4:36:35 PM] Jimmy O'Neill: [4/12/13 2:40:57 PM] Jimmy O'Neill: a reminder for anyone new who may want to show up:
[4/12/13 2:41:07 PM] Jimmy O'Neill: you get in the park from here: http://goo.gl/maps/xkKYE
[4/12/13 2:41:25 PM] Jimmy O'Neill: go to 16th and Flint and take a right
[4/12/13 2:41:35 PM] Jimmy O'Neill: and go past the tennis courts on your left
[4/12/13 2:41:38 PM] Jimmy O'Neill: plenty of parking
[5/3/13 10:20:25 AM] Jimmy O'Neill: [4/26/13 4:36:55 PM] Eric Fikus: [4/19/13 11:47:27 AM] Eric Fikus: there are also stairs at the bend in beaver