GitHub PullRequestReviewCommentEvent at 2014-10-09 14:45:25
Repository: autopin-plus
Actor: AlexanderKurtz
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/autopin/autopin-plus/pulls/comments/18649221","id":18649221,"diff_hunk":"@@ -0,0 +1,185 @@\n+/*\n+ * This file is part of Autopin+.\n+ *\n+ * Copyright (C) 2014 Alexander Kurtz <alexander@kurtz.be>\n+\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation, either version 3 of the License, or\n+ * (at your option) any later version.\n+\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+#pragma once\n+\n+#include <AutopinPlus/AutopinContext.h>\t\t// for AutopinContext, etc\n+#include <AutopinPlus/Configuration.h>\t\t// for Configuration, etc\n+#include <AutopinPlus/PerformanceMonitor.h> // for PerformanceMonitor\n+#include <AutopinPlus/ProcessTree.h>\t\t// for ProcessTree, etc\n+#include <qatomic_x86_64.h>\t\t\t\t\t// for QBasicAtomicInt::deref\n+#include <qbytearray.h>\t\t\t\t\t\t// for QByteArray\n+#include <qelapsedtimer.h>\t\t\t\t\t// for QElapsedTimer\n+#include <qglobal.h>\t\t\t\t\t\t// for qFree\n+#include <qlist.h>\t\t\t\t\t\t\t// for QList\n+#include <qset.h>\t\t\t\t\t\t\t// for QSet\n+#include <qstring.h>\t\t\t\t\t\t// for QString\n+\n+namespace AutopinPlus {\n+namespace Monitor {\n+namespace ClustSafe {\n+\n+/*!\n+ * A performance monitor which supports querying the ClustSafe device from MEGWARE.\n+ *\n+ * This performance monitor can read the current energy levels from the ClustSafe devices made by MEGWARE.\n+ *\n+ * See also: http://www.megware.com/en/produkte_leistungen/eigenentwicklungen/clustsafe-71-8.aspx\n+ */\n+class Main : public PerformanceMonitor {\n+  public:\n+\t/*!\n+\t * \\brief Constructor\n+\t *\n+\t * \\param[in] name    Name of this monitor\n+\t * \\param[in] config  Pointer to the configuration\n+\t * \\param[in] context Pointer to the context\n+\t */\n+\tMain(QString name, Configuration *config, const AutopinContext &context);\n+\n+\t// Overridden from the base class\n+\tvoid init() override;\n+\n+\t// Overridden from the base class\n+\tConfiguration::configopts getConfigOpts() override;\n+\n+\t// Overridden from the base class\n+\tvoid start(int tid) override;\n+\n+\t// Overridden from the base class\n+\tdouble value(int tid) override;\n+\n+\t// Overridden from the base class\n+\tdouble stop(int tid) override;\n+\n+\t// Overridden from the base class\n+\tvoid clear(int tid) override;\n+\n+\t// Overridden from the base class\n+\tProcessTree::autopin_tid_list getMonitoredTasks() override;\n+\n+\t// Overridden from the base class\n+\tQString getUnit() override;\n+\n+  private:\n+\t/*!\n+\t * \\brief Calculates a (very simple) checksum over an array.\n+\t *\n+\t * \\param[in] array The array to be checksummed.\n+\t *\n+\t * \\return The calculated checksum.\n+\t */\n+\tuint8_t calculateChecksum(QByteArray array);","path":"include/AutopinPlus/Monitor/ClustSafe/Main.h","position":null,"original_position":88,"commit_id":"15585b81c87c064d252ebf7f114f1c6b13836fad","original_commit_id":"1177270cb8a7033cab7f6b695725a9818a1688a7","user":{"login":"AlexanderKurtz","id":8996356,"avatar_url":"https://avatars.githubusercontent.com/u/8996356?v=2","gravatar_id":"","url":"https://api.github.com/users/AlexanderKurtz","html_url":"https://github.com/AlexanderKurtz","followers_url":"https://api.github.com/users/AlexanderKurtz/followers","following_url":"https://api.github.com/users/AlexanderKurtz/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderKurtz/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderKurtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderKurtz/subscriptions","organizations_url":"https://api.github.com/users/AlexanderKurtz/orgs","repos_url":"https://api.github.com/users/AlexanderKurtz/repos","events_url":"https://api.github.com/users/AlexanderKurtz/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderKurtz/received_events","type":"User","site_admin":false},"body":"On Thu, 2014-10-09 at 07:14 -0700, Jens Breitbart wrote:\r\n> > +     uint8_t calculateChecksum(QByteArray array);\r\n> \r\n> Looks like this function does no access any object members. Can we\r\n> just implement it as a static inline function within the .cpp file?\r\n\r\nI have marked it as static. What would be the additional benefit of\r\nmarking it as inline, aside from giving the compiler a small\r\noptimization hint?","created_at":"2014-10-09T14:45:25Z","updated_at":"2014-10-09T14:45:25Z","html_url":"https://github.com/autopin/autopin-plus/pull/3#discussion_r18649221","pull_request_url":"https://api.github.com/repos/autopin/autopin-plus/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/autopin/autopin-plus/pulls/comments/18649221"},"html":{"href":"https://github.com/autopin/autopin-plus/pull/3#discussion_r18649221"},"pull_request":{"href":"https://api.github.com/repos/autopin/autopin-plus/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/autopin/autopin-plus/pulls/3","id":22418118,"html_url":"https://github.com/autopin/autopin-plus/pull/3","diff_url":"https://github.com/autopin/autopin-plus/pull/3.diff","patch_url":"https://github.com/autopin/autopin-plus/pull/3.patch","issue_url":"https://api.github.com/repos/autopin/autopin-plus/issues/3","number":3,"state":"open","locked":false,"title":"Pull request for all the remaining patches, including the new performance monitors.","user":{"login":"AlexanderKurtz","id":8996356,"avatar_url":"https://avatars.githubusercontent.com/u/8996356?v=2","gravatar_id":"","url":"https://api.github.com/users/AlexanderKurtz","html_url":"https://github.com/AlexanderKurtz","followers_url":"https://api.github.com/users/AlexanderKurtz/followers","following_url":"https://api.github.com/users/AlexanderKurtz/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderKurtz/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderKurtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderKurtz/subscriptions","organizations_url":"https://api.github.com/users/AlexanderKurtz/orgs","repos_url":"https://api.github.com/users/AlexanderKurtz/repos","events_url":"https://api.github.com/users/AlexanderKurtz/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderKurtz/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-08T12:07:31Z","updated_at":"2014-10-09T14:45:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32ace0b06adf0fb6e71be827675f12befb4b4d6b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/autopin/autopin-plus/pulls/3/commits","review_comments_url":"https://api.github.com/repos/autopin/autopin-plus/pulls/3/comments","review_comment_url":"https://api.github.com/repos/autopin/autopin-plus/pulls/comments/{number}","comments_url":"https://api.github.com/repos/autopin/autopin-plus/issues/3/comments","statuses_url":"https://api.github.com/repos/autopin/autopin-plus/statuses/15585b81c87c064d252ebf7f114f1c6b13836fad","head":{"label":"AlexanderKurtz:master","ref":"master","sha":"15585b81c87c064d252ebf7f114f1c6b13836fad","user":{"login":"AlexanderKurtz","id":8996356,"avatar_url":"https://avatars.githubusercontent.com/u/8996356?v=2","gravatar_id":"","url":"https://api.github.com/users/AlexanderKurtz","html_url":"https://github.com/AlexanderKurtz","followers_url":"https://api.github.com/users/AlexanderKurtz/followers","following_url":"https://api.github.com/users/AlexanderKurtz/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderKurtz/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderKurtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderKurtz/subscriptions","organizations_url":"https://api.github.com/users/AlexanderKurtz/orgs","repos_url":"https://api.github.com/users/AlexanderKurtz/repos","events_url":"https://api.github.com/users/AlexanderKurtz/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderKurtz/received_events","type":"User","site_admin":false},"repo":{"id":24720616,"name":"autopin-plus","full_name":"AlexanderKurtz/autopin-plus","owner":{"login":"AlexanderKurtz","id":8996356,"avatar_url":"https://avatars.githubusercontent.com/u/8996356?v=2","gravatar_id":"","url":"https://api.github.com/users/AlexanderKurtz","html_url":"https://github.com/AlexanderKurtz","followers_url":"https://api.github.com/users/AlexanderKurtz/followers","following_url":"https://api.github.com/users/AlexanderKurtz/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderKurtz/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderKurtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderKurtz/subscriptions","organizations_url":"https://api.github.com/users/AlexanderKurtz/orgs","repos_url":"https://api.github.com/users/AlexanderKurtz/repos","events_url":"https://api.github.com/users/AlexanderKurtz/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderKurtz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlexanderKurtz/autopin-plus","description":"","fork":true,"url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus","forks_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/forks","keys_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/teams","hooks_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/hooks","issue_events_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/issues/events{/number}","events_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/events","assignees_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/assignees{/user}","branches_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/branches{/branch}","tags_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/tags","blobs_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/statuses/{sha}","languages_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/languages","stargazers_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/stargazers","contributors_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/contributors","subscribers_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/subscribers","subscription_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/subscription","commits_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/issues/comments/{number}","contents_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/contents/{+path}","compare_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/merges","archive_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/downloads","issues_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/issues{/number}","pulls_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/pulls{/number}","milestones_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/milestones{/number}","notifications_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/labels{/name}","releases_url":"https://api.github.com/repos/AlexanderKurtz/autopin-plus/releases{/id}","created_at":"2014-10-02T13:47:23Z","updated_at":"2014-10-02T14:20:08Z","pushed_at":"2014-10-09T14:44:49Z","git_url":"git://github.com/AlexanderKurtz/autopin-plus.git","ssh_url":"git@github.com:AlexanderKurtz/autopin-plus.git","clone_url":"https://github.com/AlexanderKurtz/autopin-plus.git","svn_url":"https://github.com/AlexanderKurtz/autopin-plus","homepage":null,"size":8665,"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":"autopin:master","ref":"master","sha":"e610b0da88d102b7f1a5a89fc4c2ddd50851c160","user":{"login":"autopin","id":7921748,"avatar_url":"https://avatars.githubusercontent.com/u/7921748?v=2","gravatar_id":"","url":"https://api.github.com/users/autopin","html_url":"https://github.com/autopin","followers_url":"https://api.github.com/users/autopin/followers","following_url":"https://api.github.com/users/autopin/following{/other_user}","gists_url":"https://api.github.com/users/autopin/gists{/gist_id}","starred_url":"https://api.github.com/users/autopin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopin/subscriptions","organizations_url":"https://api.github.com/users/autopin/orgs","repos_url":"https://api.github.com/users/autopin/repos","events_url":"https://api.github.com/users/autopin/events{/privacy}","received_events_url":"https://api.github.com/users/autopin/received_events","type":"Organization","site_admin":false},"repo":{"id":20958151,"name":"autopin-plus","full_name":"autopin/autopin-plus","owner":{"login":"autopin","id":7921748,"avatar_url":"https://avatars.githubusercontent.com/u/7921748?v=2","gravatar_id":"","url":"https://api.github.com/users/autopin","html_url":"https://github.com/autopin","followers_url":"https://api.github.com/users/autopin/followers","following_url":"https://api.github.com/users/autopin/following{/other_user}","gists_url":"https://api.github.com/users/autopin/gists{/gist_id}","starred_url":"https://api.github.com/users/autopin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autopin/subscriptions","organizations_url":"https://api.github.com/users/autopin/orgs","repos_url":"https://api.github.com/users/autopin/repos","events_url":"https://api.github.com/users/autopin/events{/privacy}","received_events_url":"https://api.github.com/users/autopin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autopin/autopin-plus","description":"","fork":false,"url":"https://api.github.com/repos/autopin/autopin-plus","forks_url":"https://api.github.com/repos/autopin/autopin-plus/forks","keys_url":"https://api.github.com/repos/autopin/autopin-plus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autopin/autopin-plus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autopin/autopin-plus/teams","hooks_url":"https://api.github.com/repos/autopin/autopin-plus/hooks","issue_events_url":"https://api.github.com/repos/autopin/autopin-plus/issues/events{/number}","events_url":"https://api.github.com/repos/autopin/autopin-plus/events","assignees_url":"https://api.github.com/repos/autopin/autopin-plus/assignees{/user}","branches_url":"https://api.github.com/repos/autopin/autopin-plus/branches{/branch}","tags_url":"https://api.github.com/repos/autopin/autopin-plus/tags","blobs_url":"https://api.github.com/repos/autopin/autopin-plus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autopin/autopin-plus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autopin/autopin-plus/git/refs{/sha}","trees_url":"https://api.github.com/repos/autopin/autopin-plus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autopin/autopin-plus/statuses/{sha}","languages_url":"https://api.github.com/repos/autopin/autopin-plus/languages","stargazers_url":"https://api.github.com/repos/autopin/autopin-plus/stargazers","contributors_url":"https://api.github.com/repos/autopin/autopin-plus/contributors","subscribers_url":"https://api.github.com/repos/autopin/autopin-plus/subscribers","subscription_url":"https://api.github.com/repos/autopin/autopin-plus/subscription","commits_url":"https://api.github.com/repos/autopin/autopin-plus/commits{/sha}","git_commits_url":"https://api.github.com/repos/autopin/autopin-plus/git/commits{/sha}","comments_url":"https://api.github.com/repos/autopin/autopin-plus/comments{/number}","issue_comment_url":"https://api.github.com/repos/autopin/autopin-plus/issues/comments/{number}","contents_url":"https://api.github.com/repos/autopin/autopin-plus/contents/{+path}","compare_url":"https://api.github.com/repos/autopin/autopin-plus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autopin/autopin-plus/merges","archive_url":"https://api.github.com/repos/autopin/autopin-plus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autopin/autopin-plus/downloads","issues_url":"https://api.github.com/repos/autopin/autopin-plus/issues{/number}","pulls_url":"https://api.github.com/repos/autopin/autopin-plus/pulls{/number}","milestones_url":"https://api.github.com/repos/autopin/autopin-plus/milestones{/number}","notifications_url":"https://api.github.com/repos/autopin/autopin-plus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autopin/autopin-plus/labels{/name}","releases_url":"https://api.github.com/repos/autopin/autopin-plus/releases{/id}","created_at":"2014-06-18T10:19:00Z","updated_at":"2014-10-04T09:14:02Z","pushed_at":"2014-10-04T09:14:02Z","git_url":"git://github.com/autopin/autopin-plus.git","ssh_url":"git@github.com:autopin/autopin-plus.git","clone_url":"https://github.com/autopin/autopin-plus.git","svn_url":"https://github.com/autopin/autopin-plus","homepage":null,"size":8927,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autopin/autopin-plus/pulls/3"},"html":{"href":"https://github.com/autopin/autopin-plus/pull/3"},"issue":{"href":"https://api.github.com/repos/autopin/autopin-plus/issues/3"},"comments":{"href":"https://api.github.com/repos/autopin/autopin-plus/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/autopin/autopin-plus/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/autopin/autopin-plus/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/autopin/autopin-plus/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/autopin/autopin-plus/statuses/15585b81c87c064d252ebf7f114f1c6b13836fad"}}}}