{"action":"created","comment":{"url":"https://api.github.com/repos/basho/riak_cs/pulls/comments/34749229","id":34749229,"diff_hunk":"@@ -22,24 +22,65 @@\n \n -module(riak_cs_pbc).\n \n--export([get_object/4,\n-         put_object/5,\n-         put/3,\n+-export([ping/3,\n+         get/6,\n+         repl_get/7,\n          put/4,\n-         put_with_no_meta/2,\n-         put_with_no_meta/3,\n-         list_keys/3,\n-         get_cluster_id/1,\n+         put/5,\n+         delete_obj/5,\n+         mapred/5,\n+         list_keys/4,\n+         get_index_eq/5,\n+         get_index_eq/6,\n+         get_index_range/7,\n+         get_cluster_id/1\n+        ]).\n+\n+-export([\n+         get_no_stats/5,\n+         put_object/5,\n+         put_no_stats/3,\n+         put_no_stats/4,\n+         list_keys_no_stats/3,\n          check_connection_status/2]).\n \n+-include_lib(\"riakc/include/riakc.hrl\").\n+-include(\"riak_cs_stats.hrl\").\n+\n+-spec ping(pid(), timeout(), riak_cs_stats:key()) -> pong.\n+ping(PbcPid, Timeout, StatsKey) ->\n+    _ = riak_cs_stats:inflow(StatsKey),\n+    StartTime = os:timestamp(),\n+    Result = riakc_pb_socket:ping(PbcPid, Timeout),\n+    case Result of\n+        pong ->\n+            _ = riak_cs_stats:update_with_start(StatsKey, StartTime);\n+        _ ->\n+            _ = riak_cs_stats:update_error_with_start(StatsKey, StartTime)\n+    end,\n+    Result.\n+\n %% @doc Get an object from Riak\n--spec get_object(pid(), binary(), binary(), proplists:proplist()|timeout()) ->\n+-spec get_no_stats(pid(), binary(), binary(), proplists:proplist(), timeout()) ->","path":"src/riak_cs_pbc.erl","position":59,"original_position":59,"commit_id":"374d8f497b955fd552ee374dfa96419c7a31bc1a","original_commit_id":"374d8f497b955fd552ee374dfa96419c7a31bc1a","user":{"login":"kuenishi","id":11440,"avatar_url":"https://avatars.githubusercontent.com/u/11440?v=3","gravatar_id":"","url":"https://api.github.com/users/kuenishi","html_url":"https://github.com/kuenishi","followers_url":"https://api.github.com/users/kuenishi/followers","following_url":"https://api.github.com/users/kuenishi/following{/other_user}","gists_url":"https://api.github.com/users/kuenishi/gists{/gist_id}","starred_url":"https://api.github.com/users/kuenishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuenishi/subscriptions","organizations_url":"https://api.github.com/users/kuenishi/orgs","repos_url":"https://api.github.com/users/kuenishi/repos","events_url":"https://api.github.com/users/kuenishi/events{/privacy}","received_events_url":"https://api.github.com/users/kuenishi/received_events","type":"User","site_admin":false},"body":"I would prefer `get_with_no_stats` or `get_wo_stats` to this, just a grammar.","created_at":"2015-07-16T01:44:12Z","updated_at":"2015-07-16T01:44:12Z","html_url":"https://github.com/basho/riak_cs/pull/1189#discussion_r34749229","pull_request_url":"https://api.github.com/repos/basho/riak_cs/pulls/1189","_links":{"self":{"href":"https://api.github.com/repos/basho/riak_cs/pulls/comments/34749229"},"html":{"href":"https://github.com/basho/riak_cs/pull/1189#discussion_r34749229"},"pull_request":{"href":"https://api.github.com/repos/basho/riak_cs/pulls/1189"}}},"pull_request":{"url":"https://api.github.com/repos/basho/riak_cs/pulls/1189","id":40000052,"html_url":"https://github.com/basho/riak_cs/pull/1189","diff_url":"https://github.com/basho/riak_cs/pull/1189.diff","patch_url":"https://github.com/basho/riak_cs/pull/1189.patch","issue_url":"https://api.github.com/repos/basho/riak_cs/issues/1189","number":1189,"state":"open","locked":false,"title":"Add latency stats for riak pb client operations","user":{"login":"shino","id":10225,"avatar_url":"https://avatars.githubusercontent.com/u/10225?v=3","gravatar_id":"","url":"https://api.github.com/users/shino","html_url":"https://github.com/shino","followers_url":"https://api.github.com/users/shino/followers","following_url":"https://api.github.com/users/shino/following{/other_user}","gists_url":"https://api.github.com/users/shino/gists{/gist_id}","starred_url":"https://api.github.com/users/shino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shino/subscriptions","organizations_url":"https://api.github.com/users/shino/orgs","repos_url":"https://api.github.com/users/shino/repos","events_url":"https://api.github.com/users/shino/events{/privacy}","received_events_url":"https://api.github.com/users/shino/received_events","type":"User","site_admin":false},"body":"Part 3 of stats improvement which addresses #961 (RCS-37) (RCS-217) (RCS-217) (RCS-37) (RCS-37) (RCS-217) partially.\r\n\r\nThis PR adds latency/counter stats for (almost) every riak pb client operations.\r\n\r\nExcluded operations and reasons are as follows:\r\n\r\n- Ignored because not in hot path\r\n\r\n```\r\n  ./riak_cs_app.erl:115:    case catch riakc_pb_socket:get_bucket(MasterPbc, Bucket) of\r\n```\r\n\r\n- Ignored because strongly deprecated\r\n\r\n```\r\n./riak_cs_list_objects_fsm.erl:308:    riakc_pb_socket:stream_list_keys(ManifestPbc,\r\n./riak_cs_list_objects_fsm.erl:496:    riakc_pb_socket:mapred_stream(ManifestPbc,\r\n```\r\n\r\n----\r\n\r\nAlso this PR fixes a bug that timeout is not properly set from\r\napplication environment for multipart upload listing call. Please\r\nrefer the commit message of dc637e1c9db1e5ee0c7086025a6f479a02183895\r\nfor details.\r\n","created_at":"2015-07-15T08:46:23Z","updated_at":"2015-07-16T01:44:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"430e9a0346426dd9ee2e0c687f040078cc73cbd5","assignee":null,"milestone":{"url":"https://api.github.com/repos/basho/riak_cs/milestones/18","html_url":"https://github.com/basho/riak_cs/milestones/2.1.0","labels_url":"https://api.github.com/repos/basho/riak_cs/milestones/18/labels","id":1087473,"number":18,"title":"2.1.0","description":"","creator":{"login":"kuenishi","id":11440,"avatar_url":"https://avatars.githubusercontent.com/u/11440?v=3","gravatar_id":"","url":"https://api.github.com/users/kuenishi","html_url":"https://github.com/kuenishi","followers_url":"https://api.github.com/users/kuenishi/followers","following_url":"https://api.github.com/users/kuenishi/following{/other_user}","gists_url":"https://api.github.com/users/kuenishi/gists{/gist_id}","starred_url":"https://api.github.com/users/kuenishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuenishi/subscriptions","organizations_url":"https://api.github.com/users/kuenishi/orgs","repos_url":"https://api.github.com/users/kuenishi/repos","events_url":"https://api.github.com/users/kuenishi/events{/privacy}","received_events_url":"https://api.github.com/users/kuenishi/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":34,"state":"open","created_at":"2015-04-28T13:37:13Z","updated_at":"2015-07-16T00:05:42Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/basho/riak_cs/pulls/1189/commits","review_comments_url":"https://api.github.com/repos/basho/riak_cs/pulls/1189/comments","review_comment_url":"https://api.github.com/repos/basho/riak_cs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/basho/riak_cs/issues/1189/comments","statuses_url":"https://api.github.com/repos/basho/riak_cs/statuses/374d8f497b955fd552ee374dfa96419c7a31bc1a","head":{"label":"basho:feature/stats-for-riak-pb-client","ref":"feature/stats-for-riak-pb-client","sha":"374d8f497b955fd552ee374dfa96419c7a31bc1a","user":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"repo":{"id":2513151,"name":"riak_cs","full_name":"basho/riak_cs","owner":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/basho/riak_cs","description":"Riak CS is simple, available cloud storage built on Riak.","fork":false,"url":"https://api.github.com/repos/basho/riak_cs","forks_url":"https://api.github.com/repos/basho/riak_cs/forks","keys_url":"https://api.github.com/repos/basho/riak_cs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basho/riak_cs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basho/riak_cs/teams","hooks_url":"https://api.github.com/repos/basho/riak_cs/hooks","issue_events_url":"https://api.github.com/repos/basho/riak_cs/issues/events{/number}","events_url":"https://api.github.com/repos/basho/riak_cs/events","assignees_url":"https://api.github.com/repos/basho/riak_cs/assignees{/user}","branches_url":"https://api.github.com/repos/basho/riak_cs/branches{/branch}","tags_url":"https://api.github.com/repos/basho/riak_cs/tags","blobs_url":"https://api.github.com/repos/basho/riak_cs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basho/riak_cs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basho/riak_cs/git/refs{/sha}","trees_url":"https://api.github.com/repos/basho/riak_cs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basho/riak_cs/statuses/{sha}","languages_url":"https://api.github.com/repos/basho/riak_cs/languages","stargazers_url":"https://api.github.com/repos/basho/riak_cs/stargazers","contributors_url":"https://api.github.com/repos/basho/riak_cs/contributors","subscribers_url":"https://api.github.com/repos/basho/riak_cs/subscribers","subscription_url":"https://api.github.com/repos/basho/riak_cs/subscription","commits_url":"https://api.github.com/repos/basho/riak_cs/commits{/sha}","git_commits_url":"https://api.github.com/repos/basho/riak_cs/git/commits{/sha}","comments_url":"https://api.github.com/repos/basho/riak_cs/comments{/number}","issue_comment_url":"https://api.github.com/repos/basho/riak_cs/issues/comments{/number}","contents_url":"https://api.github.com/repos/basho/riak_cs/contents/{+path}","compare_url":"https://api.github.com/repos/basho/riak_cs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basho/riak_cs/merges","archive_url":"https://api.github.com/repos/basho/riak_cs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basho/riak_cs/downloads","issues_url":"https://api.github.com/repos/basho/riak_cs/issues{/number}","pulls_url":"https://api.github.com/repos/basho/riak_cs/pulls{/number}","milestones_url":"https://api.github.com/repos/basho/riak_cs/milestones{/number}","notifications_url":"https://api.github.com/repos/basho/riak_cs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basho/riak_cs/labels{/name}","releases_url":"https://api.github.com/repos/basho/riak_cs/releases{/id}","created_at":"2011-10-04T16:16:25Z","updated_at":"2015-07-09T01:32:08Z","pushed_at":"2015-07-16T00:05:42Z","git_url":"git://github.com/basho/riak_cs.git","ssh_url":"git@github.com:basho/riak_cs.git","clone_url":"https://github.com/basho/riak_cs.git","svn_url":"https://github.com/basho/riak_cs","homepage":"http://docs.basho.com/riakcs/latest/","size":22653,"stargazers_count":379,"watchers_count":379,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":156,"forks":58,"open_issues":156,"watchers":379,"default_branch":"develop"}},"base":{"label":"basho:develop","ref":"develop","sha":"3274aa39647c74f19d438e9083fb84ed00b6b9e9","user":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"repo":{"id":2513151,"name":"riak_cs","full_name":"basho/riak_cs","owner":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/basho/riak_cs","description":"Riak CS is simple, available cloud storage built on Riak.","fork":false,"url":"https://api.github.com/repos/basho/riak_cs","forks_url":"https://api.github.com/repos/basho/riak_cs/forks","keys_url":"https://api.github.com/repos/basho/riak_cs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basho/riak_cs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basho/riak_cs/teams","hooks_url":"https://api.github.com/repos/basho/riak_cs/hooks","issue_events_url":"https://api.github.com/repos/basho/riak_cs/issues/events{/number}","events_url":"https://api.github.com/repos/basho/riak_cs/events","assignees_url":"https://api.github.com/repos/basho/riak_cs/assignees{/user}","branches_url":"https://api.github.com/repos/basho/riak_cs/branches{/branch}","tags_url":"https://api.github.com/repos/basho/riak_cs/tags","blobs_url":"https://api.github.com/repos/basho/riak_cs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basho/riak_cs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basho/riak_cs/git/refs{/sha}","trees_url":"https://api.github.com/repos/basho/riak_cs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basho/riak_cs/statuses/{sha}","languages_url":"https://api.github.com/repos/basho/riak_cs/languages","stargazers_url":"https://api.github.com/repos/basho/riak_cs/stargazers","contributors_url":"https://api.github.com/repos/basho/riak_cs/contributors","subscribers_url":"https://api.github.com/repos/basho/riak_cs/subscribers","subscription_url":"https://api.github.com/repos/basho/riak_cs/subscription","commits_url":"https://api.github.com/repos/basho/riak_cs/commits{/sha}","git_commits_url":"https://api.github.com/repos/basho/riak_cs/git/commits{/sha}","comments_url":"https://api.github.com/repos/basho/riak_cs/comments{/number}","issue_comment_url":"https://api.github.com/repos/basho/riak_cs/issues/comments{/number}","contents_url":"https://api.github.com/repos/basho/riak_cs/contents/{+path}","compare_url":"https://api.github.com/repos/basho/riak_cs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basho/riak_cs/merges","archive_url":"https://api.github.com/repos/basho/riak_cs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basho/riak_cs/downloads","issues_url":"https://api.github.com/repos/basho/riak_cs/issues{/number}","pulls_url":"https://api.github.com/repos/basho/riak_cs/pulls{/number}","milestones_url":"https://api.github.com/repos/basho/riak_cs/milestones{/number}","notifications_url":"https://api.github.com/repos/basho/riak_cs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basho/riak_cs/labels{/name}","releases_url":"https://api.github.com/repos/basho/riak_cs/releases{/id}","created_at":"2011-10-04T16:16:25Z","updated_at":"2015-07-09T01:32:08Z","pushed_at":"2015-07-16T00:05:42Z","git_url":"git://github.com/basho/riak_cs.git","ssh_url":"git@github.com:basho/riak_cs.git","clone_url":"https://github.com/basho/riak_cs.git","svn_url":"https://github.com/basho/riak_cs","homepage":"http://docs.basho.com/riakcs/latest/","size":22653,"stargazers_count":379,"watchers_count":379,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":156,"forks":58,"open_issues":156,"watchers":379,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/basho/riak_cs/pulls/1189"},"html":{"href":"https://github.com/basho/riak_cs/pull/1189"},"issue":{"href":"https://api.github.com/repos/basho/riak_cs/issues/1189"},"comments":{"href":"https://api.github.com/repos/basho/riak_cs/issues/1189/comments"},"review_comments":{"href":"https://api.github.com/repos/basho/riak_cs/pulls/1189/comments"},"review_comment":{"href":"https://api.github.com/repos/basho/riak_cs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/basho/riak_cs/pulls/1189/commits"},"statuses":{"href":"https://api.github.com/repos/basho/riak_cs/statuses/374d8f497b955fd552ee374dfa96419c7a31bc1a"}}}}