1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-11 01:12:41 +01:00
Commit graph

7509 commits

Author SHA1 Message Date
lkassianik
314dc5b957 Calendar builtin queries should include a Day View
Summary: Closes T8108, Calendar sidebar should include a Day View builtin query

Test Plan: Open Calendar, navigate to Day View in left sidebar, Day View with event preview should work as expected

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8108

Differential Revision: https://secure.phabricator.com/D12767
2015-05-07 21:18:48 -07:00
lkassianik
8b05487dd0 Adding basic transaction messages for Calendar event updates re:all-day
Summary: Closes T8021, Adding basic transaction messages for Calendar event updates re:all-day

Test Plan: Toggling "all-day" checkbox on event edit and saving should result in feed stories for event and Feed.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8021

Differential Revision: https://secure.phabricator.com/D12766
2015-05-07 21:16:30 -07:00
epriestley
528f1a9744 Scope "in-flight" PHIDs more carefully
Fixes T8125. In Feed, we query for a bunch of objects and also a bunch of transactions.

The transactions require the objects. Normally, whichever executes last will fill out of the Workspace cheaply, so this query strategy is fine overall.

The new "in-flight" code would mark everything in flight before the transactions loaded, though, so they'd fail to load even though the query plan is not cyclic.

Instead, be more surgical and mark things in flight only immediately before we put them in flight.

Test Plan: Feed now shows more stories again; files with cycles still load in finite time.

Auditors: btrahan
2015-05-07 21:10:43 -07:00
epriestley
f3d76a90f0 Translate "All Day" events into the viewer's time
Summary:
Ref T8021.

  - When "All Day" events are loaded, convert them into the viewer's time.
  - When "All Day" events are saved, convert them into a +24 hour range.

Test Plan:
  - Created and updated "All Day" events.
  - Created and updated normal events.
  - Changed timezones, edited and viewed "All Day" events and normal events.
  - In all cases, "All Day" events appeared to be 12:00AM - 11:59:59PM to the viewer, on the correct day.
  - Normal events shifted around properly according to timezones.

Reviewers: lpriestley

Reviewed By: lpriestley

Subscribers: epriestley

Maniphest Tasks: T8021

Differential Revision: https://secure.phabricator.com/D12765
2015-05-07 18:57:28 -07:00
lkassianik
57e22e3ce5 Just a sql patch for all day events.
Summary: Ref T8021, sql patch for all day events.

Test Plan: check schema by running `bin/storage upgrade`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8021

Differential Revision: https://secure.phabricator.com/D12763
2015-05-07 16:57:49 -07:00
Bob Trahan
33e7038b96 Conpherence - improve performance by handling dropdowns (notifications, threads) as standard response data
Summary: Ref T7708. Rather than invoking the general client -> server dropdown refresh path, return the data with the various conpherence requests and update the dropdowns that way. Saves 2 client -> server requests per conpherence action.

Test Plan: loaded up /conpherence/ and noted message count deduct correctly. clicked specific message and noted message count deduct successfully. did same two tests via durable column and again saw message counts deduct successfully.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7708

Differential Revision: https://secure.phabricator.com/D12761
2015-05-07 16:04:56 -07:00
Bob Trahan
ef3b62564e Conpherence - improve durable column performance when sending updates
Summary: Ref T7708. We were generating things like the files widget when users sent a comment. This is unnecessary if we are in minimal display mode. This saves us fetching some data + rendering.

Test Plan: sent messages successfully in durable column and full conpherence view

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7708

Differential Revision: https://secure.phabricator.com/D12760
2015-05-07 16:01:41 -07:00
epriestley
7556a70280 Prevent Files from requiring infinite policy checks
Summary:
Fixes T6726. Currently, a file may be attached to itself (or to other files, ultimately forming a loop). In this case, we currently run around the loop forever trying to load all the files.

Instead, decline to load objects if we're inside a query which is already loading them. This produces the right policy result //and// completes in finite time.

Test Plan:
  - Looped two files by writing `{F123}` and `{F124}` on the other files, respectively.
  - Loaded `F123`.
  - Saw long hang; used `debug.time-limit` to see huge stack trace instead.
  - Wrote patch.
  - `F123` now loads correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6726

Differential Revision: https://secure.phabricator.com/D12756
2015-05-07 15:58:35 -07:00
epriestley
a238f6a759 Implement rough content-aware inline adjustment rules for ghosts
Summary:
Ref T7447. Fixes T7600. This likely needs significant adjustment, but implements content-aware comment porting for line changes.

Specifically, this moves lines around to adjust their position considering added and removed lines between the diffs and across rebases.

It does not try to do any actual content (line against line) matching.

Test Plan:
  - Unit tests.
  - Poking around in the web UI seems to generate mostly reasonable-ish results?
  - This may be a huge step backward in some cases that I just haven't hit.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: yelirekim, epriestley

Maniphest Tasks: T7600, T7447

Differential Revision: https://secure.phabricator.com/D12741
2015-05-07 14:09:41 -07:00
epriestley
88b1ad7e92 Allow Phabricator to parse bare revision IDs from "Differential Revision:" fields
Summary: Fixes T8087. Depends on D12748.

Test Plan: See D12748.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: cburroughs, epriestley

Maniphest Tasks: T8087

Differential Revision: https://secure.phabricator.com/D12749
2015-05-07 11:10:23 -07:00
epriestley
29d34e8f62 Don't require memes to be at the end of a line
Summary: Fixes T7893.

Test Plan: {F395543}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7893

Differential Revision: https://secure.phabricator.com/D12752
2015-05-07 11:09:14 -07:00
Bob Trahan
5520dbfac6 Quicksand and Pholio - make mock edit work
Summary: Fixes T8036. In addition to making the mock edit work, this tightens quicksand code such that the correct page id is returned even if start() has not been called yet. It also tightens mock view where some functions should respect statics.enabled a bit more.

Test Plan:
clicked edit mock, mock crumb, edit mock, mock crum, edit mock, made edits and they worked! clicked edit mock, mock crumb, edit mock, mock crumb, edit mock, profile icon, hit browser back to edit mock, made edits and they worked!

also observed mock view page not occasionally wigging out from image_onload race not having statics.enabled respect during the above

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8036

Differential Revision: https://secure.phabricator.com/D12739
2015-05-07 10:42:07 -07:00
epriestley
1c39947679 Fix "not(project)" in Diffusion
Summary: Fixes T8105. We weren't including the parent WHERE clause fragment correctly.

Test Plan: Used `not(project)` in a query.

Reviewers: btrahan, avivey

Reviewed By: avivey

Subscribers: avivey, epriestley

Maniphest Tasks: T8105

Differential Revision: https://secure.phabricator.com/D12746
2015-05-07 10:16:37 -07:00
lkassianik
78438951c8 Refactoring to use PHUICalendarListView instead of boxes
Summary: Ref T4393, Refactoring to use `PHUICalendarListView` instead of boxes

Test Plan: See new sidebar

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4393

Differential Revision: https://secure.phabricator.com/D12743
2015-05-06 19:19:14 -07:00
lkassianik
7fd401d0e0 First stab at Calendar day view sidebar
Summary: Ref T4393, First stab at Calendar day view sidebar

Test Plan: Open Calendar day view, sidebar should show today and the next 6 days, empty or not.

Reviewers: epriestley, #blessed_reviewers, chad

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T4393

Differential Revision: https://secure.phabricator.com/D12742
2015-05-06 18:41:48 -07:00
epriestley
abe28e628a Improve performance of generating synthetic changesets
Summary: Ref T7776. This could get better, but I think I got most of the big stuff. It's ~4x faster now.

Test Plan:
Before:

{F393338}

After:

{F393339}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7776

Differential Revision: https://secure.phabricator.com/D12730
2015-05-06 16:43:32 -07:00
epriestley
597566823e Fix a bad Calendar query (missing space in "...event.phidAND...")
Auditors: lpriestley
2015-05-06 12:41:02 -07:00
lkassianik
a54011b84e Searching Calendar events by invitee should work now
Summary: Closes T8045, Searching Calendar events by invitee should work now

Test Plan: Open Advanced Search on Calendar, search by invitee, only events with invitee specified should be returned.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8045

Differential Revision: https://secure.phabricator.com/D12738
2015-05-06 11:12:24 -07:00
lkassianik
bcf60f1b05 Calendar event detail view should show "Unnamed Event" as title for events with no title
Summary: Closes T8048, Calendar event detail view should show "Unnamed Event" as title for events with no title

Test Plan: Open an old event created before titles were required, event detail view should display title as "Unnamed Event" instead of a blank title

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8048

Differential Revision: https://secure.phabricator.com/D12736
2015-05-06 11:11:38 -07:00
lkassianik
4cbdd0c6e9 Refactor most uses of AphrontFormDateControl to user AphrontFormDateControlValue
Summary: Ref T8024, Refactor most uses of `AphrontFormDateControl` to user `AphrontFormDateControlValue`

Test Plan: Countdown and Phrequent should now save form data in error state.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8024

Differential Revision: https://secure.phabricator.com/D12731
2015-05-05 19:19:20 -07:00
Bob Trahan
179948e232 Quicksand + Pholio - make mock view work
Summary: Ref T8036. This was a lot of JS to fiddle with.

Test Plan: viewed a mock with durable column open, clicked back to pholio home, then clicked back to mock and was able to switch images. clicked to profile and then hit browser back and was still able to switch images.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8036

Differential Revision: https://secure.phabricator.com/D12727
2015-05-05 16:18:54 -07:00
lkassianik
88ef32f61c Restricting query to return the displayed range
Summary: Ref T4393, Refactoring calendar query logic to only return at most what the query dates have specified

Test Plan: Query Calendar events for range May 1 - indefinite in month view, see events, scroll back to April, events should be absent, because April is out of range.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4393

Differential Revision: https://secure.phabricator.com/D12728
2015-05-05 16:04:00 -07:00
epriestley
7c063c7d63 Show which capability is being edited in custom policy dialog
Summary: Fixes T7867.

Test Plan: {F392844}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7867

Differential Revision: https://secure.phabricator.com/D12716
2015-05-05 15:59:56 -07:00
epriestley
a5402c46b2 Improve passphrase.query
Summary: Fixes T8070. Fixes T8071. Modernizes passphrase.query to support "order".

Test Plan:
  - Saw description in results.
  - Queried for destroyed credentials with "needSecrets=true".
  - Used "order".

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: mikn, epriestley

Maniphest Tasks: T8070, T8071

Differential Revision: https://secure.phabricator.com/D12715
2015-05-05 15:59:44 -07:00
Bob Trahan
84d0f1c41f Conpherence - send out monogram link in emails
Summary: purdier. Fixes T8081.

Test Plan: logic noodle

Reviewers: joshuaspence, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8081

Differential Revision: https://secure.phabricator.com/D12729
2015-05-05 15:49:43 -07:00
epriestley
7f8ee4e329 Fix a bug with DiffusionMergedCommitsQueryConduitAPIMethod
Summary: We were adding "+1" to PHP_INT_MAX, which could cause us to wrap and run `git log -n -9223372036854775808 ...`. Git, unable to give us negative nine trillion zillion results, would then exit without producing results.

Test Plan: Got results out of this method.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D12726
2015-05-05 15:44:34 -07:00
epriestley
336ccfeea1 Revert a fourth json_decode() which decodes possible scalars
See D12714, D12680.

Auditors: joshuaspence
2015-05-05 13:13:08 -07:00
epriestley
5f7ee505b6 Revert a third json_decode() which decodes possible scalars
See D12714, D12680.

Auditors: joshuaspence
2015-05-05 13:03:32 -07:00
lkassianik
14af40afa0 Calendar day view should have forward/back controls to scroll through days
Summary: Ref T4393, Calendar day view should have forward/back controls to scroll through days

Test Plan: Open day view on first or last day of the month, scrolling backwards or forwards through days should correctly calculate the date of the next day and the previous day and correctly find events.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T4393

Differential Revision: https://secure.phabricator.com/D12721
2015-05-05 12:51:32 -07:00
lkassianik
3463a0d497 Invitee list on Calendar event detail view should have pretty icons
Summary: Closes T8020, Invitee list on Calendar event detail view should have pretty icons.

Test Plan: Open event, invite users, event detail should show invitee names with blank circles, after users accept/decline, icons should update to green check/red times icons, respectively.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8020

Differential Revision: https://secure.phabricator.com/D12720
2015-05-05 12:29:04 -07:00
Bob Trahan
cebf459865 Conpherence - use new getDisplayTitle for search results
Summary: Fixes T8066. These search results were using getDisplayData but only need a title. Use more granular API introduced in rPf311f3f910e31b72345e37bf2e5bea0f278fd111.

Test Plan: ran a conpherence query for messages and no more fatal

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8066

Differential Revision: https://secure.phabricator.com/D12719
2015-05-05 10:35:05 -07:00
lkassianik
a802371974 Event detail view of Calendar events with no invitees should show "None" in the Properties column.
Summary: Ref T8020, Event detail view of Calendar events with no invitees should show "None" in the Properties column.

Test Plan: Open event, edit event to have no invitees, save, event detail view should show "None" in the Invitee section of the Properties column

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8020

Differential Revision: https://secure.phabricator.com/D12718
2015-05-05 10:26:15 -07:00
Joshua Spence
70c8649142 Use phutil_json_decode instead of json_decode
Summary: Generally, `phutil_json_decode` should be preferred over `json_decode`.

Test Plan: Eyellballed.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12680
2015-05-05 20:48:55 +10:00
lkassianik
0aea2cb1c0 Implement day view event clustering so that overlapping events can share latitude
Summary: Ref T4393, Implement day view event clustering so that overlapping events can share latitude.

Test Plan: Open day view in Calendar search query on a day with overlapping events. Overlapping events should be displayed side by side when possible, and should be layed out as a staircase when overlapping times.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4393

Differential Revision: https://secure.phabricator.com/D12711
2015-05-04 21:23:18 -07:00
epriestley
c5a734073d Fix two global search issues
Summary:
Fixes T8016.

  - Don't explode on bad UTF8, if we happen to get some for whatever reason.
  - Don't put `<strong>` tags in the "title" attribute.

Test Plan: Faked bad UTF8, no fatal. Hovered titles, no `<strong>` tags.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8016

Differential Revision: https://secure.phabricator.com/D12710
2015-05-04 18:34:40 -07:00
epriestley
f311f3f910 Fix a handle-related fatal in Conpherence
I'll file an issue for this, but it locked up my UI since I've got a mention in a recent thread.

Auditors: btrahan
2015-05-04 16:14:22 -07:00
Joshua Spence
2cc898a63f Add repository parameter to diffusion.findsymbols method
Summary: Ref T7977. Add a repository parameter to the `diffusion.findsymbols` Conduit method to allow restricting search results to the specified repository.

Test Plan: Queried the Conduit endpoint.

Reviewers: avivey, epriestley, #blessed_reviewers

Reviewed By: avivey, epriestley, #blessed_reviewers

Subscribers: eadler, avivey, Korvin, epriestley

Maniphest Tasks: T7977

Differential Revision: https://secure.phabricator.com/D12663
2015-05-05 08:27:08 +10:00
Joshua Spence
4ea9d76f66 Add some missing type hints
Summary: Add some typehints for Remarkup rules.

Test Plan: Browsed around some Remarkup text.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12694
2015-05-05 07:33:00 +10:00
Joshua Spence
6bebb3c69a Add "and" support to "ref"
Summary: Fixes T8038. Allow `PhabricatorCustomFieldMonogramParser` to handle "and". This means that `Ref Tx, Ty and Tz` will correctly return `array('monograms' => array('Tx', 'Ty', 'Tz')`.

Test Plan: Added unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley

Maniphest Tasks: T2, T3, T1, T8038

Differential Revision: https://secure.phabricator.com/D12682
2015-05-05 07:14:15 +10:00
Bob Trahan
16ce63ec20 Conpherence - add back in custom images
Summary: Fixes T7254. This reverts the previous functionality, but makes pertinent updates like scaling the images to 35 x 35. Codebase had moved on quite a bit so far from a straight revert but nothing too tricky relative to the code that was here before. This does not allow for changing the images from the conpherence durable column view -- that would require some JS trickery, but also doesn't fit into the current notion of the column being "light". Can always modify this later.

Test Plan:
 - from full conpherence, uploaded a square pic and things looked nice
 - from full conpherence, uploaded a rectangular pic and wasnt happy, so reinvoked edit dialog and used crop control to make it better
 - noted could not update picture from conpherence durable column
 - used different user and noted could see custom picture

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: CodeMouse92, Korvin, epriestley

Maniphest Tasks: T7254

Differential Revision: https://secure.phabricator.com/D12648
2015-05-04 13:52:22 -07:00
epriestley
29feca3c1e Add a preference to disable ghost comments
Summary: Ref T7447. At least some users dislike this feature so strongly that they'd prefer not to have it at all.

Test Plan: Viewed ghosts; toggled preference, no more ghosts.

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim, epriestley

Maniphest Tasks: T7447

Differential Revision: https://secure.phabricator.com/D12704
2015-05-04 12:02:42 -07:00
epriestley
460d68ba27 Provide link to inlines in-context in $ghost['href']
Summary: See D12702.

Test Plan: Made something a link and clicked it, seemed to work OK.

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim, epriestley

Differential Revision: https://secure.phabricator.com/D12703
2015-05-04 11:52:21 -07:00
lkassianik
c02db2d15c Refactoring CalendarEventSearchEngine to fit new null handling of AphrontFormDateControlValue
Summary: Ref T4393, Refactoring CalendarEventSearchEngine to fit new null handling of AphrontFormDateControlValue

Test Plan: Use calendar query for day view, expect no php errors

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T4393

Differential Revision: https://secure.phabricator.com/D12701
2015-05-04 11:38:21 -07:00
epriestley
2c5760d0ef Allow accounts and merchants to review unpaid invoices in Phortune
Summary:
Ref T6881. Allows accounts to browse all unpaid invoices (although we currently show all of them on the account screen anyway).

Also allows merchants to browse unpaid invoices, which they could not do before. This will let us start suspending instances for nonpayment eventually.

Test Plan:
  - Browsed unpaid invoices as various users.
  - Browsed merchant unpaid invoices.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6881

Differential Revision: https://secure.phabricator.com/D12681
2015-05-04 11:06:09 -07:00
epriestley
948d69364a Manage date control enabled state as part of DateControlValue
Summary: Ref T8024. Allow `DateControlValue` to manage enabled/disabled state, so we can eventually delete the copy of this logic in `DateControl`.

Test Plan:
  - Used Calendar ApplicationSearch queries to observe improved behaviors:
    - Error for invalid start date, if enabled.
    - Error for invalid end date, if enabled.
    - Error for invalid date range, if both enabled.
    - When submitting an invalid date (for example, with the time "Tea Time"), form retains invalid date verbatim instead of discarding information.
  - Created an event, using existing date controls to check that I didn't break anything.

Reviewers: chad, lpriestley, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8024

Differential Revision: https://secure.phabricator.com/D12673
2015-05-04 10:08:49 -07:00
epriestley
ba6b1376f2 Provide an "api" context to Multimeter for API events
Summary: Ref T6930. This gives us a better context for API calls -- "api.call.name" instead of always "web.ConduitAPIController".

Test Plan: {F391658}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6930

Differential Revision: https://secure.phabricator.com/D12677
2015-05-04 10:06:57 -07:00
epriestley
77250cd54c Allow Multimeter samples to be grouped by ID
Summary: Ref T6930. This allows samples to be split apart even if they occurred in the same request.

Test Plan: {F391657}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6930

Differential Revision: https://secure.phabricator.com/D12676
2015-05-04 10:06:43 -07:00
epriestley
bee4dc7d53 Support sampling subprocess execution in Multimeter
Summary: Ref T6930. Add subprocess sampling/labeling.

Test Plan:
(This table includes some buggy test labels.)

{F391655}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6930

Differential Revision: https://secure.phabricator.com/D12675
2015-05-04 10:06:23 -07:00
epriestley
e6e0df6aff Compute average costs more correctly in Multimeter
Summary: Ref T6930. We were dividing total cost by number of samples, but should more accurately divide it by the sum of the sample rates. This produces a more meaningful number.

Test Plan: Saw a more meaningful number in the UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6930

Differential Revision: https://secure.phabricator.com/D12655
2015-05-04 10:04:27 -07:00
epriestley
1168a8c0a0 Don't add resources to Multimeter when there's no multimeter running
Summary: Fixes T8058. Don't add a Multimeter event if we aren't running multimeter (e.g., in unit tests).

Test Plan: Will `arc unit --everything`.

Reviewers: joshuaspence, btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8058

Differential Revision: https://secure.phabricator.com/D12699
2015-05-04 09:15:15 -07:00