{"action":"created","comment":{"url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/comments/118757877","pull_request_review_id":40583807,"id":118757877,"diff_hunk":"@@ -675,6 +675,31 @@ func parseFileElements(path string, directoryDepth int) (name string, nodeName s\n \treturn name, nodeName, nil\n }\n \n+func convertToBytes(s string) string {\n+\tnew_s := \"\"\n+\tmultiplier := 1\n+\tswitch finalChar := s[len(s)-1:]; finalChar {\n+\tcase \"K\":\n+\t\tnew_s = strings.TrimSuffix(s, \"K\")\n+\t\tmultiplier = 1000\n+\tcase \"M\":\n+\t\tnew_s = strings.TrimSuffix(s, \"M\")\n+\t\tmultiplier = 1000000\n+\tcase \"G\":\n+\t\tnew_s = strings.TrimSuffix(s, \"G\")\n+\t\tmultiplier = 1000000000\n+\tdefault:\n+\t\t//this should only happen for integers\n+\t\treturn s\n+\t}\n+\tbyteVal, err := strconv.Atoi(new_s)\n+\tif err != nil {\n+\t\treturn s\n+\t}\n+\tbyteVal = byteVal * multiplier\n+\treturn strconv.Itoa(byteVal)","path":"sources/procfs.go","position":null,"original_position":39,"commit_id":"24b86a00420f0b5b04cf0ce4c643dd00e53ee5f8","original_commit_id":"bbdc9970676904619f46f7c579dc9e1e88f1fbd9","user":{"login":"joehandzik","id":7061812,"avatar_url":"https://avatars1.githubusercontent.com/u/7061812?v=3","gravatar_id":"","url":"https://api.github.com/users/joehandzik","html_url":"https://github.com/joehandzik","followers_url":"https://api.github.com/users/joehandzik/followers","following_url":"https://api.github.com/users/joehandzik/following{/other_user}","gists_url":"https://api.github.com/users/joehandzik/gists{/gist_id}","starred_url":"https://api.github.com/users/joehandzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehandzik/subscriptions","organizations_url":"https://api.github.com/users/joehandzik/orgs","repos_url":"https://api.github.com/users/joehandzik/repos","events_url":"https://api.github.com/users/joehandzik/events{/privacy}","received_events_url":"https://api.github.com/users/joehandzik/received_events","type":"User","site_admin":false},"body":"Ok, after looking at this again and looking at some of the float-to-string and string-to-float methods, I'm not sure that's any better. I could convert the math.Pow() operations to uint64 immediately, but that just makes the code messier. Any serious opposition to leaving the PR as-is currently?","created_at":"2017-05-26T18:00:06Z","updated_at":"2017-05-26T18:00:06Z","html_url":"https://github.com/HewlettPackard/lustre_exporter/pull/86#discussion_r118757877","pull_request_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/comments/118757877"},"html":{"href":"https://github.com/HewlettPackard/lustre_exporter/pull/86#discussion_r118757877"},"pull_request":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/86","id":122519866,"html_url":"https://github.com/HewlettPackard/lustre_exporter/pull/86","diff_url":"https://github.com/HewlettPackard/lustre_exporter/pull/86.diff","patch_url":"https://github.com/HewlettPackard/lustre_exporter/pull/86.patch","issue_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues/86","number":86,"state":"open","locked":false,"title":"Convert brw_stats sizes to bytes","user":{"login":"joehandzik","id":7061812,"avatar_url":"https://avatars1.githubusercontent.com/u/7061812?v=3","gravatar_id":"","url":"https://api.github.com/users/joehandzik","html_url":"https://github.com/joehandzik","followers_url":"https://api.github.com/users/joehandzik/followers","following_url":"https://api.github.com/users/joehandzik/following{/other_user}","gists_url":"https://api.github.com/users/joehandzik/gists{/gist_id}","starred_url":"https://api.github.com/users/joehandzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehandzik/subscriptions","organizations_url":"https://api.github.com/users/joehandzik/orgs","repos_url":"https://api.github.com/users/joehandzik/repos","events_url":"https://api.github.com/users/joehandzik/events{/privacy}","received_events_url":"https://api.github.com/users/joehandzik/received_events","type":"User","site_admin":false},"body":"This will work through IO sizes of Gigabytes\r\n\r\nFixes #50\r\n\r\nSigned-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>","created_at":"2017-05-25T20:33:33Z","updated_at":"2017-05-26T18:00:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8deeb6ee8c657c159be31e6024a3f6b9052e6baa","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/86/commits","review_comments_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/86/comments","review_comment_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues/86/comments","statuses_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/statuses/24b86a00420f0b5b04cf0ce4c643dd00e53ee5f8","head":{"label":"HewlettPackard:wip-fix-issue-50","ref":"wip-fix-issue-50","sha":"24b86a00420f0b5b04cf0ce4c643dd00e53ee5f8","user":{"login":"HewlettPackard","id":6004705,"avatar_url":"https://avatars3.githubusercontent.com/u/6004705?v=3","gravatar_id":"","url":"https://api.github.com/users/HewlettPackard","html_url":"https://github.com/HewlettPackard","followers_url":"https://api.github.com/users/HewlettPackard/followers","following_url":"https://api.github.com/users/HewlettPackard/following{/other_user}","gists_url":"https://api.github.com/users/HewlettPackard/gists{/gist_id}","starred_url":"https://api.github.com/users/HewlettPackard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HewlettPackard/subscriptions","organizations_url":"https://api.github.com/users/HewlettPackard/orgs","repos_url":"https://api.github.com/users/HewlettPackard/repos","events_url":"https://api.github.com/users/HewlettPackard/events{/privacy}","received_events_url":"https://api.github.com/users/HewlettPackard/received_events","type":"Organization","site_admin":false},"repo":{"id":77952885,"name":"lustre_exporter","full_name":"HewlettPackard/lustre_exporter","owner":{"login":"HewlettPackard","id":6004705,"avatar_url":"https://avatars3.githubusercontent.com/u/6004705?v=3","gravatar_id":"","url":"https://api.github.com/users/HewlettPackard","html_url":"https://github.com/HewlettPackard","followers_url":"https://api.github.com/users/HewlettPackard/followers","following_url":"https://api.github.com/users/HewlettPackard/following{/other_user}","gists_url":"https://api.github.com/users/HewlettPackard/gists{/gist_id}","starred_url":"https://api.github.com/users/HewlettPackard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HewlettPackard/subscriptions","organizations_url":"https://api.github.com/users/HewlettPackard/orgs","repos_url":"https://api.github.com/users/HewlettPackard/repos","events_url":"https://api.github.com/users/HewlettPackard/events{/privacy}","received_events_url":"https://api.github.com/users/HewlettPackard/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HewlettPackard/lustre_exporter","description":"Prometheus exporter for use with the Lustre parallel filesystem","fork":false,"url":"https://api.github.com/repos/HewlettPackard/lustre_exporter","forks_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/forks","keys_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/teams","hooks_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/hooks","issue_events_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/events","assignees_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/tags","blobs_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/languages","stargazers_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/stargazers","contributors_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/contributors","subscribers_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/subscribers","subscription_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/subscription","commits_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/merges","archive_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/downloads","issues_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/labels{/name}","releases_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/deployments","created_at":"2017-01-03T20:58:31Z","updated_at":"2017-05-23T08:44:41Z","pushed_at":"2017-05-26T17:29:18Z","git_url":"git://github.com/HewlettPackard/lustre_exporter.git","ssh_url":"git@github.com:HewlettPackard/lustre_exporter.git","clone_url":"https://github.com/HewlettPackard/lustre_exporter.git","svn_url":"https://github.com/HewlettPackard/lustre_exporter","homepage":null,"size":949,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":5,"default_branch":"master"}},"base":{"label":"HewlettPackard:master","ref":"master","sha":"ba031bbe350868a3ade312a9f44b39bef2f1eb83","user":{"login":"HewlettPackard","id":6004705,"avatar_url":"https://avatars3.githubusercontent.com/u/6004705?v=3","gravatar_id":"","url":"https://api.github.com/users/HewlettPackard","html_url":"https://github.com/HewlettPackard","followers_url":"https://api.github.com/users/HewlettPackard/followers","following_url":"https://api.github.com/users/HewlettPackard/following{/other_user}","gists_url":"https://api.github.com/users/HewlettPackard/gists{/gist_id}","starred_url":"https://api.github.com/users/HewlettPackard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HewlettPackard/subscriptions","organizations_url":"https://api.github.com/users/HewlettPackard/orgs","repos_url":"https://api.github.com/users/HewlettPackard/repos","events_url":"https://api.github.com/users/HewlettPackard/events{/privacy}","received_events_url":"https://api.github.com/users/HewlettPackard/received_events","type":"Organization","site_admin":false},"repo":{"id":77952885,"name":"lustre_exporter","full_name":"HewlettPackard/lustre_exporter","owner":{"login":"HewlettPackard","id":6004705,"avatar_url":"https://avatars3.githubusercontent.com/u/6004705?v=3","gravatar_id":"","url":"https://api.github.com/users/HewlettPackard","html_url":"https://github.com/HewlettPackard","followers_url":"https://api.github.com/users/HewlettPackard/followers","following_url":"https://api.github.com/users/HewlettPackard/following{/other_user}","gists_url":"https://api.github.com/users/HewlettPackard/gists{/gist_id}","starred_url":"https://api.github.com/users/HewlettPackard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HewlettPackard/subscriptions","organizations_url":"https://api.github.com/users/HewlettPackard/orgs","repos_url":"https://api.github.com/users/HewlettPackard/repos","events_url":"https://api.github.com/users/HewlettPackard/events{/privacy}","received_events_url":"https://api.github.com/users/HewlettPackard/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HewlettPackard/lustre_exporter","description":"Prometheus exporter for use with the Lustre parallel filesystem","fork":false,"url":"https://api.github.com/repos/HewlettPackard/lustre_exporter","forks_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/forks","keys_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/teams","hooks_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/hooks","issue_events_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues/events{/number}","events_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/events","assignees_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/assignees{/user}","branches_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/branches{/branch}","tags_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/tags","blobs_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/languages","stargazers_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/stargazers","contributors_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/contributors","subscribers_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/subscribers","subscription_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/subscription","commits_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/contents/{+path}","compare_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/merges","archive_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/downloads","issues_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues{/number}","pulls_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/labels{/name}","releases_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/releases{/id}","deployments_url":"https://api.github.com/repos/HewlettPackard/lustre_exporter/deployments","created_at":"2017-01-03T20:58:31Z","updated_at":"2017-05-23T08:44:41Z","pushed_at":"2017-05-26T17:29:18Z","git_url":"git://github.com/HewlettPackard/lustre_exporter.git","ssh_url":"git@github.com:HewlettPackard/lustre_exporter.git","clone_url":"https://github.com/HewlettPackard/lustre_exporter.git","svn_url":"https://github.com/HewlettPackard/lustre_exporter","homepage":null,"size":949,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/86"},"html":{"href":"https://github.com/HewlettPackard/lustre_exporter/pull/86"},"issue":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues/86"},"comments":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/HewlettPackard/lustre_exporter/statuses/24b86a00420f0b5b04cf0ce4c643dd00e53ee5f8"}}}}
{"actor":{"display_login":"joehandzik"}}