{"action":"created","comment":{"url":"https://api.github.com/repos/hyrise/hyrise/pulls/comments/180467224","pull_request_review_id":110891885,"id":180467224,"diff_hunk":"@@ -0,0 +1,128 @@\n+#pragma once\n+\n+#include <memory>\n+#include <set>\n+\n+#include \"tuning/tuning_operation.hpp\"\n+\n+namespace opossum {\n+\n+/**\n+ * A TuningChoice represents a possible system modification with a certain\n+ * performance impact coming at a cost.\n+ *\n+ * TuningChoices are generated by AbstractEvaluators in a Tuner instance\n+ * and either accepted or rejected by an AbstractSelector while generating\n+ * a sequence of TuningOperations to improve the overall system performance.\n+ */\n+class TuningChoice {\n+ public:\n+  virtual ~TuningChoice() {}\n+  /**\n+   * An estimate regarding the performance impact of this modification.\n+   * values < 0.0f: expected degradation of system performance\n+   * values > 0.0f: expected improvement of system performance\n+   *\n+   * No scaling constraints are specified so that this value is only comparable\n+   * among TuningChoices generated by compatible AbstractEvaluator implementations.\n+   */\n+  virtual float desirability() const = 0;\n+\n+  /**\n+   * How certain the producing evaluator was when generating this choice.\n+   * Very basic evaluators will probably output choices with low confidence\n+   * in general.\n+   * Similarly, if an evaluator is very specialized for a certain edge case,\n+   * it might produce few choices with high confidence and several other\n+   * choices with a low confidence value, as other evaluators might be able\n+   * to give better results in these cases.\n+   */\n+  virtual float confidence() const = 0;\n+\n+  /**\n+   * Convenience accessors for desirability() that in their default implementation\n+   * return the performance benetfts expected from accepting or rejecting this choice.\n+   */\n+  virtual float accept_desirability() const;\n+  virtual float reject_desirability() const;\n+\n+  /**\n+   * An estimate of the absolute costs of this modification.\n+   *\n+   * As this value is intended to be counted against a common budget,\n+   * care must be taken that all AbstractEvaluators use the same cost measure.\n+   */\n+  virtual float cost() const = 0;\n+\n+  /**\n+   * Convenience accessors for cost() that in their default implementation\n+   * return the cost this choice currently imposes on the system and the respective\n+   * cost delta resulting from an accept and reject operation.\n+   */\n+  virtual float current_cost() const;\n+  virtual float accept_cost() const;\n+  virtual float reject_cost() const;\n+\n+  /**\n+   * True, if this modification is already present in the current system state.\n+   */\n+  virtual bool is_currently_chosen() const = 0;\n+\n+  /**\n+   * A list of other TuningChoices that should/can not be chosen if this\n+   * TuningChoice is accepted.\n+   */\n+  const std::set<std::shared_ptr<TuningChoice>>& invalidates() const;","path":"src/lib/tuning/tuning_choice.hpp","position":75,"original_position":75,"commit_id":"1d83a6bb6e1625a2d18de0eedfbb4303fd53de61","original_commit_id":"3f38aa451cb0cc6d9f7f7ce96c4fa54c5657cf06","user":{"login":"lw0","id":6776309,"avatar_url":"https://avatars3.githubusercontent.com/u/6776309?v=4","gravatar_id":"","url":"https://api.github.com/users/lw0","html_url":"https://github.com/lw0","followers_url":"https://api.github.com/users/lw0/followers","following_url":"https://api.github.com/users/lw0/following{/other_user}","gists_url":"https://api.github.com/users/lw0/gists{/gist_id}","starred_url":"https://api.github.com/users/lw0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lw0/subscriptions","organizations_url":"https://api.github.com/users/lw0/orgs","repos_url":"https://api.github.com/users/lw0/repos","events_url":"https://api.github.com/users/lw0/events{/privacy}","received_events_url":"https://api.github.com/users/lw0/received_events","type":"User","site_admin":false},"body":"This comment would need to be added to the IndexEvaluator, because the TuningChoice can not know how it is used by specific Evaluators.","created_at":"2018-04-10T15:33:46Z","updated_at":"2018-04-10T15:33:46Z","html_url":"https://github.com/hyrise/hyrise/pull/715#discussion_r180467224","pull_request_url":"https://api.github.com/repos/hyrise/hyrise/pulls/715","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/comments/180467224"},"html":{"href":"https://github.com/hyrise/hyrise/pull/715#discussion_r180467224"},"pull_request":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/715"}},"in_reply_to_id":173237836},"pull_request":{"url":"https://api.github.com/repos/hyrise/hyrise/pulls/715","id":170054596,"html_url":"https://github.com/hyrise/hyrise/pull/715","diff_url":"https://github.com/hyrise/hyrise/pull/715.diff","patch_url":"https://github.com/hyrise/hyrise/pull/715.patch","issue_url":"https://api.github.com/repos/hyrise/hyrise/issues/715","number":715,"state":"open","locked":false,"title":"BYOD: Self driving database - Introduce Tuning Subsystem","user":{"login":"AtiX","id":236678,"avatar_url":"https://avatars3.githubusercontent.com/u/236678?v=4","gravatar_id":"","url":"https://api.github.com/users/AtiX","html_url":"https://github.com/AtiX","followers_url":"https://api.github.com/users/AtiX/followers","following_url":"https://api.github.com/users/AtiX/following{/other_user}","gists_url":"https://api.github.com/users/AtiX/gists{/gist_id}","starred_url":"https://api.github.com/users/AtiX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtiX/subscriptions","organizations_url":"https://api.github.com/users/AtiX/orgs","repos_url":"https://api.github.com/users/AtiX/repos","events_url":"https://api.github.com/users/AtiX/events{/privacy}","received_events_url":"https://api.github.com/users/AtiX/received_events","type":"User","site_admin":false},"body":"(BYOD topic \"Self driving database\", group 01 - @lw0 @adi64 @atix)\r\n\r\nIntroduces a tuning subsystem that allows different aspects of the database to be tuned. The system can be extended to support concrete use cases by implementing the provided abstract classes. Exemplary implementation is provided for creating/removing indices by estimating their usefulness based on cached queries and column statistics.\r\n\r\n**How to read this PR**\r\n\r\n1. Start by looking at the provided architecture diagram.\r\n2. Try it out! Currently, there is a `hyrisePlaygroundGroup01` and `playgroundTableGenerator` (to build  the tables first) build target you can use to test out the system.\r\n3. We recommend following it through the code. We propose the following order:\r\n   1. **src/lib/tuning/** - follow the dataflow. Look at abstract / base classes first, then concrete implementations.\r\n   2. **src/bin/playground** - Roughly understand what our demo looks like and what it does to get the big picture. Keep in mind that this is only a demo.\r\n   3. Have a look at the tests.\r\n   4. Then catch up on the other files - these are mostly small adaptations we've made to properly integrate our subsystem.\r\n   5. ignore src/test/names/, as it just contains test data.\r\n\r\nArchitecture overview:\r\n![grafik](https://user-images.githubusercontent.com/236678/36397280-64afe062-15c2-11e8-9fd9-e7e9588e2944.png)\r\n\r\nAlso have a look at the [wiki page](https://github.com/hyrise/hyrise/wiki/Self-Driving-Database)\r\n\r\nTasks:\r\n\r\n- [X] Add reviewers once I got collaborator access: @marcelja, @toniSta and @BJennWare\r\n- [ ] What about logging? https://github.com/hyrise/hyrise/issues/714\r\n","created_at":"2018-02-19T21:20:38Z","updated_at":"2018-04-10T15:33:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af0851d8e6fb753329b8d12496d029dd8925f059","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hyrise/hyrise/pulls/715/commits","review_comments_url":"https://api.github.com/repos/hyrise/hyrise/pulls/715/comments","review_comment_url":"https://api.github.com/repos/hyrise/hyrise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyrise/hyrise/issues/715/comments","statuses_url":"https://api.github.com/repos/hyrise/hyrise/statuses/1d83a6bb6e1625a2d18de0eedfbb4303fd53de61","head":{"label":"adi64:feature/self_driving_basic_structure","ref":"feature/self_driving_basic_structure","sha":"1d83a6bb6e1625a2d18de0eedfbb4303fd53de61","user":{"login":"adi64","id":5867277,"avatar_url":"https://avatars3.githubusercontent.com/u/5867277?v=4","gravatar_id":"","url":"https://api.github.com/users/adi64","html_url":"https://github.com/adi64","followers_url":"https://api.github.com/users/adi64/followers","following_url":"https://api.github.com/users/adi64/following{/other_user}","gists_url":"https://api.github.com/users/adi64/gists{/gist_id}","starred_url":"https://api.github.com/users/adi64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adi64/subscriptions","organizations_url":"https://api.github.com/users/adi64/orgs","repos_url":"https://api.github.com/users/adi64/repos","events_url":"https://api.github.com/users/adi64/events{/privacy}","received_events_url":"https://api.github.com/users/adi64/received_events","type":"User","site_admin":false},"repo":{"id":114243599,"name":"hyrise","full_name":"adi64/hyrise","owner":{"login":"adi64","id":5867277,"avatar_url":"https://avatars3.githubusercontent.com/u/5867277?v=4","gravatar_id":"","url":"https://api.github.com/users/adi64","html_url":"https://github.com/adi64","followers_url":"https://api.github.com/users/adi64/followers","following_url":"https://api.github.com/users/adi64/following{/other_user}","gists_url":"https://api.github.com/users/adi64/gists{/gist_id}","starred_url":"https://api.github.com/users/adi64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adi64/subscriptions","organizations_url":"https://api.github.com/users/adi64/orgs","repos_url":"https://api.github.com/users/adi64/repos","events_url":"https://api.github.com/users/adi64/events{/privacy}","received_events_url":"https://api.github.com/users/adi64/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adi64/hyrise","description":"A research in-memory database.","fork":true,"url":"https://api.github.com/repos/adi64/hyrise","forks_url":"https://api.github.com/repos/adi64/hyrise/forks","keys_url":"https://api.github.com/repos/adi64/hyrise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adi64/hyrise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adi64/hyrise/teams","hooks_url":"https://api.github.com/repos/adi64/hyrise/hooks","issue_events_url":"https://api.github.com/repos/adi64/hyrise/issues/events{/number}","events_url":"https://api.github.com/repos/adi64/hyrise/events","assignees_url":"https://api.github.com/repos/adi64/hyrise/assignees{/user}","branches_url":"https://api.github.com/repos/adi64/hyrise/branches{/branch}","tags_url":"https://api.github.com/repos/adi64/hyrise/tags","blobs_url":"https://api.github.com/repos/adi64/hyrise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adi64/hyrise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adi64/hyrise/git/refs{/sha}","trees_url":"https://api.github.com/repos/adi64/hyrise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adi64/hyrise/statuses/{sha}","languages_url":"https://api.github.com/repos/adi64/hyrise/languages","stargazers_url":"https://api.github.com/repos/adi64/hyrise/stargazers","contributors_url":"https://api.github.com/repos/adi64/hyrise/contributors","subscribers_url":"https://api.github.com/repos/adi64/hyrise/subscribers","subscription_url":"https://api.github.com/repos/adi64/hyrise/subscription","commits_url":"https://api.github.com/repos/adi64/hyrise/commits{/sha}","git_commits_url":"https://api.github.com/repos/adi64/hyrise/git/commits{/sha}","comments_url":"https://api.github.com/repos/adi64/hyrise/comments{/number}","issue_comment_url":"https://api.github.com/repos/adi64/hyrise/issues/comments{/number}","contents_url":"https://api.github.com/repos/adi64/hyrise/contents/{+path}","compare_url":"https://api.github.com/repos/adi64/hyrise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adi64/hyrise/merges","archive_url":"https://api.github.com/repos/adi64/hyrise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adi64/hyrise/downloads","issues_url":"https://api.github.com/repos/adi64/hyrise/issues{/number}","pulls_url":"https://api.github.com/repos/adi64/hyrise/pulls{/number}","milestones_url":"https://api.github.com/repos/adi64/hyrise/milestones{/number}","notifications_url":"https://api.github.com/repos/adi64/hyrise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adi64/hyrise/labels{/name}","releases_url":"https://api.github.com/repos/adi64/hyrise/releases{/id}","deployments_url":"https://api.github.com/repos/adi64/hyrise/deployments","created_at":"2017-12-14T11:41:59Z","updated_at":"2018-04-10T12:57:16Z","pushed_at":"2018-04-10T13:01:25Z","git_url":"git://github.com/adi64/hyrise.git","ssh_url":"git@github.com:adi64/hyrise.git","clone_url":"https://github.com/adi64/hyrise.git","svn_url":"https://github.com/adi64/hyrise","homepage":"https://hpi.de/plattner/projects/hyrise.html","size":11490,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"hyrise:master","ref":"master","sha":"049fd5d8b6a753157d256d304c6e0977ac7dd79b","user":{"login":"hyrise","id":3465095,"avatar_url":"https://avatars2.githubusercontent.com/u/3465095?v=4","gravatar_id":"","url":"https://api.github.com/users/hyrise","html_url":"https://github.com/hyrise","followers_url":"https://api.github.com/users/hyrise/followers","following_url":"https://api.github.com/users/hyrise/following{/other_user}","gists_url":"https://api.github.com/users/hyrise/gists{/gist_id}","starred_url":"https://api.github.com/users/hyrise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyrise/subscriptions","organizations_url":"https://api.github.com/users/hyrise/orgs","repos_url":"https://api.github.com/users/hyrise/repos","events_url":"https://api.github.com/users/hyrise/events{/privacy}","received_events_url":"https://api.github.com/users/hyrise/received_events","type":"Organization","site_admin":false},"repo":{"id":87414843,"name":"hyrise","full_name":"hyrise/hyrise","owner":{"login":"hyrise","id":3465095,"avatar_url":"https://avatars2.githubusercontent.com/u/3465095?v=4","gravatar_id":"","url":"https://api.github.com/users/hyrise","html_url":"https://github.com/hyrise","followers_url":"https://api.github.com/users/hyrise/followers","following_url":"https://api.github.com/users/hyrise/following{/other_user}","gists_url":"https://api.github.com/users/hyrise/gists{/gist_id}","starred_url":"https://api.github.com/users/hyrise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyrise/subscriptions","organizations_url":"https://api.github.com/users/hyrise/orgs","repos_url":"https://api.github.com/users/hyrise/repos","events_url":"https://api.github.com/users/hyrise/events{/privacy}","received_events_url":"https://api.github.com/users/hyrise/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyrise/hyrise","description":"A research in-memory database.","fork":false,"url":"https://api.github.com/repos/hyrise/hyrise","forks_url":"https://api.github.com/repos/hyrise/hyrise/forks","keys_url":"https://api.github.com/repos/hyrise/hyrise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyrise/hyrise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyrise/hyrise/teams","hooks_url":"https://api.github.com/repos/hyrise/hyrise/hooks","issue_events_url":"https://api.github.com/repos/hyrise/hyrise/issues/events{/number}","events_url":"https://api.github.com/repos/hyrise/hyrise/events","assignees_url":"https://api.github.com/repos/hyrise/hyrise/assignees{/user}","branches_url":"https://api.github.com/repos/hyrise/hyrise/branches{/branch}","tags_url":"https://api.github.com/repos/hyrise/hyrise/tags","blobs_url":"https://api.github.com/repos/hyrise/hyrise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyrise/hyrise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyrise/hyrise/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyrise/hyrise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyrise/hyrise/statuses/{sha}","languages_url":"https://api.github.com/repos/hyrise/hyrise/languages","stargazers_url":"https://api.github.com/repos/hyrise/hyrise/stargazers","contributors_url":"https://api.github.com/repos/hyrise/hyrise/contributors","subscribers_url":"https://api.github.com/repos/hyrise/hyrise/subscribers","subscription_url":"https://api.github.com/repos/hyrise/hyrise/subscription","commits_url":"https://api.github.com/repos/hyrise/hyrise/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyrise/hyrise/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyrise/hyrise/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyrise/hyrise/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyrise/hyrise/contents/{+path}","compare_url":"https://api.github.com/repos/hyrise/hyrise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyrise/hyrise/merges","archive_url":"https://api.github.com/repos/hyrise/hyrise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyrise/hyrise/downloads","issues_url":"https://api.github.com/repos/hyrise/hyrise/issues{/number}","pulls_url":"https://api.github.com/repos/hyrise/hyrise/pulls{/number}","milestones_url":"https://api.github.com/repos/hyrise/hyrise/milestones{/number}","notifications_url":"https://api.github.com/repos/hyrise/hyrise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyrise/hyrise/labels{/name}","releases_url":"https://api.github.com/repos/hyrise/hyrise/releases{/id}","deployments_url":"https://api.github.com/repos/hyrise/hyrise/deployments","created_at":"2017-04-06T10:03:31Z","updated_at":"2018-04-10T08:10:58Z","pushed_at":"2018-04-10T13:54:45Z","git_url":"git://github.com/hyrise/hyrise.git","ssh_url":"git@github.com:hyrise/hyrise.git","clone_url":"https://github.com/hyrise/hyrise.git","svn_url":"https://github.com/hyrise/hyrise","homepage":"https://hpi.de/plattner/projects/hyrise.html","size":13653,"stargazers_count":64,"watchers_count":64,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":78,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":21,"open_issues":78,"watchers":64,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/715"},"html":{"href":"https://github.com/hyrise/hyrise/pull/715"},"issue":{"href":"https://api.github.com/repos/hyrise/hyrise/issues/715"},"comments":{"href":"https://api.github.com/repos/hyrise/hyrise/issues/715/comments"},"review_comments":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/715/comments"},"review_comment":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/715/commits"},"statuses":{"href":"https://api.github.com/repos/hyrise/hyrise/statuses/1d83a6bb6e1625a2d18de0eedfbb4303fd53de61"}},"author_association":"NONE"}}
{"actor":{"display_login":"lw0"}}