{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/serenity/pulls/comments/34888027","id":34888027,"diff_hunk":"@@ -0,0 +1,51 @@\n+#ifndef SERENITY_VISUALISATION_UTILS_HPP\n+#define SERENITY_VISUALISATION_UTILS_HPP\n+\n+#include <iostream>\n+#include <iomanip>\n+#include <string>\n+\n+#include \"glog/logging.h\"\n+\n+#include \"stout/try.hpp\"\n+\n+namespace mesos {\n+namespace serenity {\n+\n+class Precision {\n+ public:\n+  static constexpr uint32_t MILI = 3;\n+  static constexpr uint32_t MIKRO = 6;\n+  static constexpr uint32_t NANO = 9;\n+};\n+\n+inline std::string DblTimestampToString(\n+    const double_t _timestamp,\n+    const uint32_t _precision = Precision::MILI) {\n+  std::stringstream timeStream;\n+  timeStream << std::fixed << std::setprecision(_precision) << _timestamp;\n+\n+  std::string timeStr(timeStream.str());\n+  timeStr.erase(std::remove(timeStr.begin(), timeStr.end(), '.'),\n+                timeStr.end());\n+\n+  return timeStr;\n+}\n+\n+inline Try<std::string> GetHostName() {","path":"visualisation/backend/utils.hpp","position":35,"original_position":35,"commit_id":"6f1956cb25b4f20665458a77e949a0f67386b3c3","original_commit_id":"6f1956cb25b4f20665458a77e949a0f67386b3c3","user":{"login":"skonefal","id":10141081,"avatar_url":"https://avatars.githubusercontent.com/u/10141081?v=3","gravatar_id":"","url":"https://api.github.com/users/skonefal","html_url":"https://github.com/skonefal","followers_url":"https://api.github.com/users/skonefal/followers","following_url":"https://api.github.com/users/skonefal/following{/other_user}","gists_url":"https://api.github.com/users/skonefal/gists{/gist_id}","starred_url":"https://api.github.com/users/skonefal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skonefal/subscriptions","organizations_url":"https://api.github.com/users/skonefal/orgs","repos_url":"https://api.github.com/users/skonefal/repos","events_url":"https://api.github.com/users/skonefal/events{/privacy}","received_events_url":"https://api.github.com/users/skonefal/received_events","type":"User","site_admin":false},"body":"Is there a way to get slave address and port?\r\nI could hardcode http://localhost:5051/state.json for now.","created_at":"2015-07-17T13:22:21Z","updated_at":"2015-07-17T13:22:21Z","html_url":"https://github.com/mesosphere/serenity/pull/49#discussion_r34888027","pull_request_url":"https://api.github.com/repos/mesosphere/serenity/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/comments/34888027"},"html":{"href":"https://github.com/mesosphere/serenity/pull/49#discussion_r34888027"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/serenity/pulls/49","id":39925893,"html_url":"https://github.com/mesosphere/serenity/pull/49","diff_url":"https://github.com/mesosphere/serenity/pull/49.diff","patch_url":"https://github.com/mesosphere/serenity/pull/49.patch","issue_url":"https://api.github.com/repos/mesosphere/serenity/issues/49","number":49,"state":"open","locked":false,"title":"Serenity Visualisaion","user":{"login":"skonefal","id":10141081,"avatar_url":"https://avatars.githubusercontent.com/u/10141081?v=3","gravatar_id":"","url":"https://api.github.com/users/skonefal","html_url":"https://github.com/skonefal","followers_url":"https://api.github.com/users/skonefal/followers","following_url":"https://api.github.com/users/skonefal/following{/other_user}","gists_url":"https://api.github.com/users/skonefal/gists{/gist_id}","starred_url":"https://api.github.com/users/skonefal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skonefal/subscriptions","organizations_url":"https://api.github.com/users/skonefal/orgs","repos_url":"https://api.github.com/users/skonefal/repos","events_url":"https://api.github.com/users/skonefal/events{/privacy}","received_events_url":"https://api.github.com/users/skonefal/received_events","type":"User","site_admin":false},"body":"Serenity Visualisation of slack resources and resource usage. Pushes metrics to InfluxDB backend and visualize on Grafana. Could be used to monitor (small) cluster.\r\n\r\nPreview - not ready to merge.\r\n\r\nTODO: Add docker with visualisation (InfluxDB 8 + Grafana 2.1). Add curlcpp lib.\r\n          ","created_at":"2015-07-14T15:08:20Z","updated_at":"2015-07-17T13:22:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2a6d2339d8a1719bf8e56485e8d00dc5b502967","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/serenity/pulls/49/commits","review_comments_url":"https://api.github.com/repos/mesosphere/serenity/pulls/49/comments","review_comment_url":"https://api.github.com/repos/mesosphere/serenity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/serenity/issues/49/comments","statuses_url":"https://api.github.com/repos/mesosphere/serenity/statuses/6f1956cb25b4f20665458a77e949a0f67386b3c3","head":{"label":"skonefal:visualisation","ref":"visualisation","sha":"6f1956cb25b4f20665458a77e949a0f67386b3c3","user":{"login":"skonefal","id":10141081,"avatar_url":"https://avatars.githubusercontent.com/u/10141081?v=3","gravatar_id":"","url":"https://api.github.com/users/skonefal","html_url":"https://github.com/skonefal","followers_url":"https://api.github.com/users/skonefal/followers","following_url":"https://api.github.com/users/skonefal/following{/other_user}","gists_url":"https://api.github.com/users/skonefal/gists{/gist_id}","starred_url":"https://api.github.com/users/skonefal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skonefal/subscriptions","organizations_url":"https://api.github.com/users/skonefal/orgs","repos_url":"https://api.github.com/users/skonefal/repos","events_url":"https://api.github.com/users/skonefal/events{/privacy}","received_events_url":"https://api.github.com/users/skonefal/received_events","type":"User","site_admin":false},"repo":{"id":35975826,"name":"serenity","full_name":"skonefal/serenity","owner":{"login":"skonefal","id":10141081,"avatar_url":"https://avatars.githubusercontent.com/u/10141081?v=3","gravatar_id":"","url":"https://api.github.com/users/skonefal","html_url":"https://github.com/skonefal","followers_url":"https://api.github.com/users/skonefal/followers","following_url":"https://api.github.com/users/skonefal/following{/other_user}","gists_url":"https://api.github.com/users/skonefal/gists{/gist_id}","starred_url":"https://api.github.com/users/skonefal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skonefal/subscriptions","organizations_url":"https://api.github.com/users/skonefal/orgs","repos_url":"https://api.github.com/users/skonefal/repos","events_url":"https://api.github.com/users/skonefal/events{/privacy}","received_events_url":"https://api.github.com/users/skonefal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skonefal/serenity","description":"Repo for Intel:Mesosphere Oversubscription Technologies","fork":true,"url":"https://api.github.com/repos/skonefal/serenity","forks_url":"https://api.github.com/repos/skonefal/serenity/forks","keys_url":"https://api.github.com/repos/skonefal/serenity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skonefal/serenity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skonefal/serenity/teams","hooks_url":"https://api.github.com/repos/skonefal/serenity/hooks","issue_events_url":"https://api.github.com/repos/skonefal/serenity/issues/events{/number}","events_url":"https://api.github.com/repos/skonefal/serenity/events","assignees_url":"https://api.github.com/repos/skonefal/serenity/assignees{/user}","branches_url":"https://api.github.com/repos/skonefal/serenity/branches{/branch}","tags_url":"https://api.github.com/repos/skonefal/serenity/tags","blobs_url":"https://api.github.com/repos/skonefal/serenity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skonefal/serenity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skonefal/serenity/git/refs{/sha}","trees_url":"https://api.github.com/repos/skonefal/serenity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skonefal/serenity/statuses/{sha}","languages_url":"https://api.github.com/repos/skonefal/serenity/languages","stargazers_url":"https://api.github.com/repos/skonefal/serenity/stargazers","contributors_url":"https://api.github.com/repos/skonefal/serenity/contributors","subscribers_url":"https://api.github.com/repos/skonefal/serenity/subscribers","subscription_url":"https://api.github.com/repos/skonefal/serenity/subscription","commits_url":"https://api.github.com/repos/skonefal/serenity/commits{/sha}","git_commits_url":"https://api.github.com/repos/skonefal/serenity/git/commits{/sha}","comments_url":"https://api.github.com/repos/skonefal/serenity/comments{/number}","issue_comment_url":"https://api.github.com/repos/skonefal/serenity/issues/comments{/number}","contents_url":"https://api.github.com/repos/skonefal/serenity/contents/{+path}","compare_url":"https://api.github.com/repos/skonefal/serenity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skonefal/serenity/merges","archive_url":"https://api.github.com/repos/skonefal/serenity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skonefal/serenity/downloads","issues_url":"https://api.github.com/repos/skonefal/serenity/issues{/number}","pulls_url":"https://api.github.com/repos/skonefal/serenity/pulls{/number}","milestones_url":"https://api.github.com/repos/skonefal/serenity/milestones{/number}","notifications_url":"https://api.github.com/repos/skonefal/serenity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skonefal/serenity/labels{/name}","releases_url":"https://api.github.com/repos/skonefal/serenity/releases{/id}","created_at":"2015-05-20T21:42:25Z","updated_at":"2015-05-20T21:42:26Z","pushed_at":"2015-07-14T15:01:17Z","git_url":"git://github.com/skonefal/serenity.git","ssh_url":"git@github.com:skonefal/serenity.git","clone_url":"https://github.com/skonefal/serenity.git","svn_url":"https://github.com/skonefal/serenity","homepage":null,"size":4418,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"mesosphere:master","ref":"master","sha":"965993016306dbc3dd4183d12dafe3695c81feaf","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":35688047,"name":"serenity","full_name":"mesosphere/serenity","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/serenity","description":"Repo for Intel:Mesosphere Oversubscription Technologies","fork":false,"url":"https://api.github.com/repos/mesosphere/serenity","forks_url":"https://api.github.com/repos/mesosphere/serenity/forks","keys_url":"https://api.github.com/repos/mesosphere/serenity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/serenity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/serenity/teams","hooks_url":"https://api.github.com/repos/mesosphere/serenity/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/serenity/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/serenity/events","assignees_url":"https://api.github.com/repos/mesosphere/serenity/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/serenity/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/serenity/tags","blobs_url":"https://api.github.com/repos/mesosphere/serenity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/serenity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/serenity/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/serenity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/serenity/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/serenity/languages","stargazers_url":"https://api.github.com/repos/mesosphere/serenity/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/serenity/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/serenity/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/serenity/subscription","commits_url":"https://api.github.com/repos/mesosphere/serenity/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/serenity/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/serenity/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/serenity/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/serenity/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/serenity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/serenity/merges","archive_url":"https://api.github.com/repos/mesosphere/serenity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/serenity/downloads","issues_url":"https://api.github.com/repos/mesosphere/serenity/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/serenity/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/serenity/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/serenity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/serenity/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/serenity/releases{/id}","created_at":"2015-05-15T17:46:54Z","updated_at":"2015-07-17T08:15:19Z","pushed_at":"2015-07-16T16:24:31Z","git_url":"git://github.com/mesosphere/serenity.git","ssh_url":"git@github.com:mesosphere/serenity.git","clone_url":"https://github.com/mesosphere/serenity.git","svn_url":"https://github.com/mesosphere/serenity","homepage":null,"size":4853,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/49"},"html":{"href":"https://github.com/mesosphere/serenity/pull/49"},"issue":{"href":"https://api.github.com/repos/mesosphere/serenity/issues/49"},"comments":{"href":"https://api.github.com/repos/mesosphere/serenity/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/serenity/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/serenity/statuses/6f1956cb25b4f20665458a77e949a0f67386b3c3"}}}}