{"action":"created","comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/93375181","pull_request_review_id":13900407,"id":93375181,"diff_hunk":"@@ -446,15 +521,26 @@ class NodeGraphs extends React.Component<NodeGraphsProps, {}> {\n           <SummaryStat title=\"Total Nodes\" value={this.props.nodeCount} />\n           <SummaryStat title=\"Capacity Used\" value={capacityPercent}\n                        format={(v) => `${d3.format(\".2f\")(v)}%`}\n-                       tooltip={`You are using ${Bytes(capacityUsed)} of ${Bytes(capacityTotal)} \n+                       tooltip={`You are using ${Bytes(capacityUsed)} of ${Bytes(capacityTotal)}\n                        storage capacity across all nodes.`} />\n+          <SummaryStat title=\"Unavailable ranges\" value={this.props.unavailableRanges} />\n+          <SummaryStat title=\"Queries per second\" value={this.props.queriesPerSecond} />\n+          <SummaryStat title=\"P50 latency\" value={this.props.p50Latency} format={(n) => d3.format(\".1f\")(NanoToMilli(n)) + \" ms\"} />","path":"pkg/ui/app/containers/nodeGraphs.tsx","position":125,"original_position":125,"commit_id":"4097c8d6355f87ad06fa4f0afaaf4dc5f060bcf5","original_commit_id":"4097c8d6355f87ad06fa4f0afaaf4dc5f060bcf5","user":{"login":"maxlang","id":3691886,"avatar_url":"https://avatars.githubusercontent.com/u/3691886?v=3","gravatar_id":"","url":"https://api.github.com/users/maxlang","html_url":"https://github.com/maxlang","followers_url":"https://api.github.com/users/maxlang/followers","following_url":"https://api.github.com/users/maxlang/following{/other_user}","gists_url":"https://api.github.com/users/maxlang/gists{/gist_id}","starred_url":"https://api.github.com/users/maxlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxlang/subscriptions","organizations_url":"https://api.github.com/users/maxlang/orgs","repos_url":"https://api.github.com/users/maxlang/repos","events_url":"https://api.github.com/users/maxlang/events{/privacy}","received_events_url":"https://api.github.com/users/maxlang/received_events","type":"User","site_admin":false},"body":"I considered that approach but this seemed much more straightforward, though I'll agree that the logic probably shouldn't all be in `nodeGraphs.tsx`. \r\n\r\nI examined it further and the most difficult component to mess with is not `MetricsDataProvider` but rather the `metrics` state. I'd have to change the way `nextRequest` is used. It honestly doesn't seem worth it to modify this logic especially since we know we'll only ever have one set of current data that we want for each page. We can just use the `cachedDataReducer` to make and store the current data request. The question is where it should live.","created_at":"2016-12-21T04:52:20Z","updated_at":"2016-12-21T04:52:20Z","html_url":"https://github.com/cockroachdb/cockroach/pull/12486#discussion_r93375181","pull_request_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/12486","_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/93375181"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/12486#discussion_r93375181"},"pull_request":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/12486"}}},"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/12486","id":98644450,"html_url":"https://github.com/cockroachdb/cockroach/pull/12486","diff_url":"https://github.com/cockroachdb/cockroach/pull/12486.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/12486.patch","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/12486","number":12486,"state":"open","locked":false,"title":"ui: Add some summary bar metrics","user":{"login":"maxlang","id":3691886,"avatar_url":"https://avatars.githubusercontent.com/u/3691886?v=3","gravatar_id":"","url":"https://api.github.com/users/maxlang","html_url":"https://github.com/maxlang","followers_url":"https://api.github.com/users/maxlang/followers","following_url":"https://api.github.com/users/maxlang/following{/other_user}","gists_url":"https://api.github.com/users/maxlang/gists{/gist_id}","starred_url":"https://api.github.com/users/maxlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxlang/subscriptions","organizations_url":"https://api.github.com/users/maxlang/orgs","repos_url":"https://api.github.com/users/maxlang/repos","events_url":"https://api.github.com/users/maxlang/events{/privacy}","received_events_url":"https://api.github.com/users/maxlang/received_events","type":"User","site_admin":false},"body":"This commit adds metrics as per the current design, though they\r\ncan be easily changed.\r\n\r\nAs part of this, it adds a new \"metrics\" CachedDataReducer that\r\ncan store a single metrics query. This is used to fetch the current\r\ntime series values for a small subset of metrics used by the\r\nsummary box (specifically queries per second and p50/p99 latencies)\r\nwhich are computed over time and aren't fetched in the normal node\r\ndata query.\r\n\r\nTo enable this I exported the queryFromProps function from\r\nmetricsDataProvider and use it to generate queries just for the\r\nspecific metrics I care about. Then I retrieve the values by\r\nindex from the state.\r\n\r\nIn the future we will probably want a more generalized way of\r\nfetching the current data, but this should work for now.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/12486)\n<!-- Reviewable:end -->\n","created_at":"2016-12-19T21:37:54Z","updated_at":"2016-12-21T04:52:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1985c239c2f6c38c4f6429e937ad46e33a4e2941","assignee":{"login":"mrtracy","id":6969858,"avatar_url":"https://avatars.githubusercontent.com/u/6969858?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtracy","html_url":"https://github.com/mrtracy","followers_url":"https://api.github.com/users/mrtracy/followers","following_url":"https://api.github.com/users/mrtracy/following{/other_user}","gists_url":"https://api.github.com/users/mrtracy/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtracy/subscriptions","organizations_url":"https://api.github.com/users/mrtracy/orgs","repos_url":"https://api.github.com/users/mrtracy/repos","events_url":"https://api.github.com/users/mrtracy/events{/privacy}","received_events_url":"https://api.github.com/users/mrtracy/received_events","type":"User","site_admin":false},"assignees":[{"login":"mrtracy","id":6969858,"avatar_url":"https://avatars.githubusercontent.com/u/6969858?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtracy","html_url":"https://github.com/mrtracy","followers_url":"https://api.github.com/users/mrtracy/followers","following_url":"https://api.github.com/users/mrtracy/following{/other_user}","gists_url":"https://api.github.com/users/mrtracy/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtracy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtracy/subscriptions","organizations_url":"https://api.github.com/users/mrtracy/orgs","repos_url":"https://api.github.com/users/mrtracy/repos","events_url":"https://api.github.com/users/mrtracy/events{/privacy}","received_events_url":"https://api.github.com/users/mrtracy/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/12486/commits","review_comments_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/12486/comments","review_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/12486/comments","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/4097c8d6355f87ad06fa4f0afaaf4dc5f060bcf5","head":{"label":"maxlang:maxlang/ui-summary-box","ref":"maxlang/ui-summary-box","sha":"4097c8d6355f87ad06fa4f0afaaf4dc5f060bcf5","user":{"login":"maxlang","id":3691886,"avatar_url":"https://avatars.githubusercontent.com/u/3691886?v=3","gravatar_id":"","url":"https://api.github.com/users/maxlang","html_url":"https://github.com/maxlang","followers_url":"https://api.github.com/users/maxlang/followers","following_url":"https://api.github.com/users/maxlang/following{/other_user}","gists_url":"https://api.github.com/users/maxlang/gists{/gist_id}","starred_url":"https://api.github.com/users/maxlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxlang/subscriptions","organizations_url":"https://api.github.com/users/maxlang/orgs","repos_url":"https://api.github.com/users/maxlang/repos","events_url":"https://api.github.com/users/maxlang/events{/privacy}","received_events_url":"https://api.github.com/users/maxlang/received_events","type":"User","site_admin":false},"repo":{"id":42961226,"name":"cockroach","full_name":"maxlang/cockroach","owner":{"login":"maxlang","id":3691886,"avatar_url":"https://avatars.githubusercontent.com/u/3691886?v=3","gravatar_id":"","url":"https://api.github.com/users/maxlang","html_url":"https://github.com/maxlang","followers_url":"https://api.github.com/users/maxlang/followers","following_url":"https://api.github.com/users/maxlang/following{/other_user}","gists_url":"https://api.github.com/users/maxlang/gists{/gist_id}","starred_url":"https://api.github.com/users/maxlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxlang/subscriptions","organizations_url":"https://api.github.com/users/maxlang/orgs","repos_url":"https://api.github.com/users/maxlang/repos","events_url":"https://api.github.com/users/maxlang/events{/privacy}","received_events_url":"https://api.github.com/users/maxlang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maxlang/cockroach","description":"A Scalable, Geo-Replicated, Transactional Datastore","fork":true,"url":"https://api.github.com/repos/maxlang/cockroach","forks_url":"https://api.github.com/repos/maxlang/cockroach/forks","keys_url":"https://api.github.com/repos/maxlang/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maxlang/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maxlang/cockroach/teams","hooks_url":"https://api.github.com/repos/maxlang/cockroach/hooks","issue_events_url":"https://api.github.com/repos/maxlang/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/maxlang/cockroach/events","assignees_url":"https://api.github.com/repos/maxlang/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/maxlang/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/maxlang/cockroach/tags","blobs_url":"https://api.github.com/repos/maxlang/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maxlang/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maxlang/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/maxlang/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maxlang/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/maxlang/cockroach/languages","stargazers_url":"https://api.github.com/repos/maxlang/cockroach/stargazers","contributors_url":"https://api.github.com/repos/maxlang/cockroach/contributors","subscribers_url":"https://api.github.com/repos/maxlang/cockroach/subscribers","subscription_url":"https://api.github.com/repos/maxlang/cockroach/subscription","commits_url":"https://api.github.com/repos/maxlang/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/maxlang/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/maxlang/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/maxlang/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/maxlang/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/maxlang/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maxlang/cockroach/merges","archive_url":"https://api.github.com/repos/maxlang/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maxlang/cockroach/downloads","issues_url":"https://api.github.com/repos/maxlang/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/maxlang/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/maxlang/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/maxlang/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maxlang/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/maxlang/cockroach/releases{/id}","deployments_url":"https://api.github.com/repos/maxlang/cockroach/deployments","created_at":"2015-09-22T21:15:04Z","updated_at":"2016-01-13T20:06:52Z","pushed_at":"2016-12-20T17:09:27Z","git_url":"git://github.com/maxlang/cockroach.git","ssh_url":"git@github.com:maxlang/cockroach.git","clone_url":"https://github.com/maxlang/cockroach.git","svn_url":"https://github.com/maxlang/cockroach","homepage":null,"size":241054,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cockroachdb:master","ref":"master","sha":"3c704cb37802def407c22aa793ed7d4b26c6f084","user":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"repo":{"id":16563587,"name":"cockroach","full_name":"cockroachdb/cockroach","owner":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockroachdb/cockroach","description":"A Scalable, Survivable, Strongly-Consistent SQL Database","fork":false,"url":"https://api.github.com/repos/cockroachdb/cockroach","forks_url":"https://api.github.com/repos/cockroachdb/cockroach/forks","keys_url":"https://api.github.com/repos/cockroachdb/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockroachdb/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockroachdb/cockroach/teams","hooks_url":"https://api.github.com/repos/cockroachdb/cockroach/hooks","issue_events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/cockroachdb/cockroach/events","assignees_url":"https://api.github.com/repos/cockroachdb/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/cockroachdb/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/cockroachdb/cockroach/tags","blobs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockroachdb/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockroachdb/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/cockroachdb/cockroach/languages","stargazers_url":"https://api.github.com/repos/cockroachdb/cockroach/stargazers","contributors_url":"https://api.github.com/repos/cockroachdb/cockroach/contributors","subscribers_url":"https://api.github.com/repos/cockroachdb/cockroach/subscribers","subscription_url":"https://api.github.com/repos/cockroachdb/cockroach/subscription","commits_url":"https://api.github.com/repos/cockroachdb/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockroachdb/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockroachdb/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/cockroachdb/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockroachdb/cockroach/merges","archive_url":"https://api.github.com/repos/cockroachdb/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockroachdb/cockroach/downloads","issues_url":"https://api.github.com/repos/cockroachdb/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/cockroachdb/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/cockroachdb/cockroach/releases{/id}","deployments_url":"https://api.github.com/repos/cockroachdb/cockroach/deployments","created_at":"2014-02-06T00:18:47Z","updated_at":"2016-12-21T03:55:09Z","pushed_at":"2016-12-21T04:41:08Z","git_url":"git://github.com/cockroachdb/cockroach.git","ssh_url":"git@github.com:cockroachdb/cockroach.git","clone_url":"https://github.com/cockroachdb/cockroach.git","svn_url":"https://github.com/cockroachdb/cockroach","homepage":"https://www.cockroachlabs.com","size":409030,"stargazers_count":8085,"watchers_count":8085,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":816,"mirror_url":null,"open_issues_count":843,"forks":816,"open_issues":843,"watchers":8085,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/12486"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/12486"},"issue":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/12486"},"comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/12486/comments"},"review_comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/12486/comments"},"review_comment":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/12486/commits"},"statuses":{"href":"https://api.github.com/repos/cockroachdb/cockroach/statuses/4097c8d6355f87ad06fa4f0afaaf4dc5f060bcf5"}}}}
{"actor":{"display_login":"maxlang"}}