Page MenuHomePhabricator

Measure how long build targets take in Harbormaster

Authored by hach-que on Aug 7 2014, 7:28 AM.



Ref T1049. This keeps track of how long a build target takes to execute in Harbormaster and displays it in the build view page. I'm not sure whether "Started" is really that useful once the target has completed?

Also, I change the name of the time taken depending on whether or not the target has completed; if it's still in progress it's called "Elapsed" and if it's completed then it's "Duration". The primary reason for this is that "Duration" sounds like post tense, whereas "Elapsed" is current tense. I'm not sure whether this is okay or not?

Test Plan

Ran a Sleep build step and saw the target dates / times appear correctly.

Diff Detail

rP Phabricator
Lint Skipped
Unit Tests Skipped

Event Timeline

hach-que updated this revision to Diff 24475.Aug 7 2014, 7:28 AM
hach-que retitled this revision from to Measure how long build targets take in Harbormaster.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
epriestley accepted this revision.Aug 11 2014, 9:39 PM
epriestley edited edge metadata.
epriestley added inline comments.

(Not specific to this diff and we aren't very consistent about it, but prefer PhabricatorTime::getNow() to time(), since we can change the value of "now" in unit tests with the PhabricatorTime API. We might also synchronize "time" to the database (or some other source of truth) in the future to try to deal with clock skew.)

This revision is now accepted and ready to land.Aug 11 2014, 9:39 PM

(And all the UI stuff seems fine to me, we can tweak it when the UI gets some attention.)

hach-que closed this revision.Aug 11 2014, 10:34 PM
hach-que updated this revision to Diff 24604.

Closed by commit rPefc82c727bb4 (authored by @hach-que).