{"action":"created","comment":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/215356333","pull_request_review_id":152602231,"id":215356333,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTM1NjMzMw==","diff_hunk":"@@ -705,11 +729,12 @@ func (ev *evaluator) rangeEval(f func([]Value, *EvalNodeHelper) Vector, exprs ..\n \t\t\tvectors[i] = vectors[i][:0]\n \t\t\tfor si, series := range matrixes[i] {\n \t\t\t\tfor _, point := range series.Points {\n-\t\t\t\t\tif point.T == ts {\n+\t\t\t\t\tif point.T == ts && ev.currentSamples < ev.maxSamples {\n \t\t\t\t\t\tvectors[i] = append(vectors[i], Sample{Metric: series.Metric, Point: point})\n \t\t\t\t\t\t// Move input vectors forward so we don't have to re-scan the same\n \t\t\t\t\t\t// past points at the next step.\n \t\t\t\t\t\tmatrixes[i][si].Points = series.Points[1:]\n+\t\t\t\t\t\tev.currentSamples++","path":"promql/engine.go","position":174,"original_position":174,"commit_id":"94a1ba6868c420a215b12f3776fa09a4fa6a5535","original_commit_id":"94a1ba6868c420a215b12f3776fa09a4fa6a5535","user":{"login":"cstyan","id":3246492,"node_id":"MDQ6VXNlcjMyNDY0OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/3246492?v=4","gravatar_id":"","url":"https://api.github.com/users/cstyan","html_url":"https://github.com/cstyan","followers_url":"https://api.github.com/users/cstyan/followers","following_url":"https://api.github.com/users/cstyan/following{/other_user}","gists_url":"https://api.github.com/users/cstyan/gists{/gist_id}","starred_url":"https://api.github.com/users/cstyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstyan/subscriptions","organizations_url":"https://api.github.com/users/cstyan/orgs","repos_url":"https://api.github.com/users/cstyan/repos","events_url":"https://api.github.com/users/cstyan/events{/privacy}","received_events_url":"https://api.github.com/users/cstyan/received_events","type":"User","site_admin":false},"body":"Okay, so in that case I need a query for one of the tests that would load more than a single sample into memory per timestamp. The tests I have at the moment load at most one sample per ts, and I don't think setting the `ev.maxSamples` value to 0 is really a valid test.","created_at":"2018-09-05T17:17:48Z","updated_at":"2018-09-05T17:17:49Z","html_url":"https://github.com/prometheus/prometheus/pull/4513#discussion_r215356333","pull_request_url":"https://api.github.com/repos/prometheus/prometheus/pulls/4513","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments/215356333"},"html":{"href":"https://github.com/prometheus/prometheus/pull/4513#discussion_r215356333"},"pull_request":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/4513"}},"in_reply_to_id":215251778},"pull_request":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/4513","id":208918325,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4OTE4MzI1","html_url":"https://github.com/prometheus/prometheus/pull/4513","diff_url":"https://github.com/prometheus/prometheus/pull/4513.diff","patch_url":"https://github.com/prometheus/prometheus/pull/4513.patch","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/4513","number":4513,"state":"open","locked":false,"title":"WIP: keep track of samples per query, set a max # of samples","user":{"login":"cstyan","id":3246492,"node_id":"MDQ6VXNlcjMyNDY0OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/3246492?v=4","gravatar_id":"","url":"https://api.github.com/users/cstyan","html_url":"https://github.com/cstyan","followers_url":"https://api.github.com/users/cstyan/followers","following_url":"https://api.github.com/users/cstyan/following{/other_user}","gists_url":"https://api.github.com/users/cstyan/gists{/gist_id}","starred_url":"https://api.github.com/users/cstyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstyan/subscriptions","organizations_url":"https://api.github.com/users/cstyan/orgs","repos_url":"https://api.github.com/users/cstyan/repos","events_url":"https://api.github.com/users/cstyan/events{/privacy}","received_events_url":"https://api.github.com/users/cstyan/received_events","type":"User","site_admin":false},"body":"For #4414 \r\n\r\nMostly looking for feedback on whether or not I'm on the right track here, naive solution for now. \r\n@brian-brazil @tomwilkie \r\n\r\nSigned-off-by: Callum Stytan <callumstyan@gmail.com>","created_at":"2018-08-16T16:38:26Z","updated_at":"2018-09-05T17:17:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4464937a136f67777aaae6178d6cc0c71b5ef3dc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/prometheus/prometheus/pulls/4513/commits","review_comments_url":"https://api.github.com/repos/prometheus/prometheus/pulls/4513/comments","review_comment_url":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/4513/comments","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/94a1ba6868c420a215b12f3776fa09a4fa6a5535","head":{"label":"cstyan:callum-4414","ref":"callum-4414","sha":"94a1ba6868c420a215b12f3776fa09a4fa6a5535","user":{"login":"cstyan","id":3246492,"node_id":"MDQ6VXNlcjMyNDY0OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/3246492?v=4","gravatar_id":"","url":"https://api.github.com/users/cstyan","html_url":"https://github.com/cstyan","followers_url":"https://api.github.com/users/cstyan/followers","following_url":"https://api.github.com/users/cstyan/following{/other_user}","gists_url":"https://api.github.com/users/cstyan/gists{/gist_id}","starred_url":"https://api.github.com/users/cstyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstyan/subscriptions","organizations_url":"https://api.github.com/users/cstyan/orgs","repos_url":"https://api.github.com/users/cstyan/repos","events_url":"https://api.github.com/users/cstyan/events{/privacy}","received_events_url":"https://api.github.com/users/cstyan/received_events","type":"User","site_admin":false},"repo":{"id":98469226,"node_id":"MDEwOlJlcG9zaXRvcnk5ODQ2OTIyNg==","name":"prometheus","full_name":"cstyan/prometheus","owner":{"login":"cstyan","id":3246492,"node_id":"MDQ6VXNlcjMyNDY0OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/3246492?v=4","gravatar_id":"","url":"https://api.github.com/users/cstyan","html_url":"https://github.com/cstyan","followers_url":"https://api.github.com/users/cstyan/followers","following_url":"https://api.github.com/users/cstyan/following{/other_user}","gists_url":"https://api.github.com/users/cstyan/gists{/gist_id}","starred_url":"https://api.github.com/users/cstyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstyan/subscriptions","organizations_url":"https://api.github.com/users/cstyan/orgs","repos_url":"https://api.github.com/users/cstyan/repos","events_url":"https://api.github.com/users/cstyan/events{/privacy}","received_events_url":"https://api.github.com/users/cstyan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cstyan/prometheus","description":"The Prometheus monitoring system and time series database.","fork":true,"url":"https://api.github.com/repos/cstyan/prometheus","forks_url":"https://api.github.com/repos/cstyan/prometheus/forks","keys_url":"https://api.github.com/repos/cstyan/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cstyan/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cstyan/prometheus/teams","hooks_url":"https://api.github.com/repos/cstyan/prometheus/hooks","issue_events_url":"https://api.github.com/repos/cstyan/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/cstyan/prometheus/events","assignees_url":"https://api.github.com/repos/cstyan/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/cstyan/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/cstyan/prometheus/tags","blobs_url":"https://api.github.com/repos/cstyan/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cstyan/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cstyan/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/cstyan/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cstyan/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/cstyan/prometheus/languages","stargazers_url":"https://api.github.com/repos/cstyan/prometheus/stargazers","contributors_url":"https://api.github.com/repos/cstyan/prometheus/contributors","subscribers_url":"https://api.github.com/repos/cstyan/prometheus/subscribers","subscription_url":"https://api.github.com/repos/cstyan/prometheus/subscription","commits_url":"https://api.github.com/repos/cstyan/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/cstyan/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/cstyan/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/cstyan/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/cstyan/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/cstyan/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cstyan/prometheus/merges","archive_url":"https://api.github.com/repos/cstyan/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cstyan/prometheus/downloads","issues_url":"https://api.github.com/repos/cstyan/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/cstyan/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/cstyan/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/cstyan/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cstyan/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/cstyan/prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/cstyan/prometheus/deployments","created_at":"2017-07-26T22:00:14Z","updated_at":"2017-07-26T22:00:18Z","pushed_at":"2018-09-04T21:18:26Z","git_url":"git://github.com/cstyan/prometheus.git","ssh_url":"git@github.com:cstyan/prometheus.git","clone_url":"https://github.com/cstyan/prometheus.git","svn_url":"https://github.com/cstyan/prometheus","homepage":"https://prometheus.io/","size":39299,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prometheus:master","ref":"master","sha":"75bd348135019c6bf5bee4350a339964e62f2d8a","user":{"login":"prometheus","id":3380462,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzODA0NjI=","avatar_url":"https://avatars3.githubusercontent.com/u/3380462?v=4","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"repo":{"id":6838921,"node_id":"MDEwOlJlcG9zaXRvcnk2ODM4OTIx","name":"prometheus","full_name":"prometheus/prometheus","owner":{"login":"prometheus","id":3380462,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzODA0NjI=","avatar_url":"https://avatars3.githubusercontent.com/u/3380462?v=4","gravatar_id":"","url":"https://api.github.com/users/prometheus","html_url":"https://github.com/prometheus","followers_url":"https://api.github.com/users/prometheus/followers","following_url":"https://api.github.com/users/prometheus/following{/other_user}","gists_url":"https://api.github.com/users/prometheus/gists{/gist_id}","starred_url":"https://api.github.com/users/prometheus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prometheus/subscriptions","organizations_url":"https://api.github.com/users/prometheus/orgs","repos_url":"https://api.github.com/users/prometheus/repos","events_url":"https://api.github.com/users/prometheus/events{/privacy}","received_events_url":"https://api.github.com/users/prometheus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prometheus/prometheus","description":"The Prometheus monitoring system and time series database.","fork":false,"url":"https://api.github.com/repos/prometheus/prometheus","forks_url":"https://api.github.com/repos/prometheus/prometheus/forks","keys_url":"https://api.github.com/repos/prometheus/prometheus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prometheus/prometheus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prometheus/prometheus/teams","hooks_url":"https://api.github.com/repos/prometheus/prometheus/hooks","issue_events_url":"https://api.github.com/repos/prometheus/prometheus/issues/events{/number}","events_url":"https://api.github.com/repos/prometheus/prometheus/events","assignees_url":"https://api.github.com/repos/prometheus/prometheus/assignees{/user}","branches_url":"https://api.github.com/repos/prometheus/prometheus/branches{/branch}","tags_url":"https://api.github.com/repos/prometheus/prometheus/tags","blobs_url":"https://api.github.com/repos/prometheus/prometheus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prometheus/prometheus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prometheus/prometheus/git/refs{/sha}","trees_url":"https://api.github.com/repos/prometheus/prometheus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prometheus/prometheus/statuses/{sha}","languages_url":"https://api.github.com/repos/prometheus/prometheus/languages","stargazers_url":"https://api.github.com/repos/prometheus/prometheus/stargazers","contributors_url":"https://api.github.com/repos/prometheus/prometheus/contributors","subscribers_url":"https://api.github.com/repos/prometheus/prometheus/subscribers","subscription_url":"https://api.github.com/repos/prometheus/prometheus/subscription","commits_url":"https://api.github.com/repos/prometheus/prometheus/commits{/sha}","git_commits_url":"https://api.github.com/repos/prometheus/prometheus/git/commits{/sha}","comments_url":"https://api.github.com/repos/prometheus/prometheus/comments{/number}","issue_comment_url":"https://api.github.com/repos/prometheus/prometheus/issues/comments{/number}","contents_url":"https://api.github.com/repos/prometheus/prometheus/contents/{+path}","compare_url":"https://api.github.com/repos/prometheus/prometheus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prometheus/prometheus/merges","archive_url":"https://api.github.com/repos/prometheus/prometheus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prometheus/prometheus/downloads","issues_url":"https://api.github.com/repos/prometheus/prometheus/issues{/number}","pulls_url":"https://api.github.com/repos/prometheus/prometheus/pulls{/number}","milestones_url":"https://api.github.com/repos/prometheus/prometheus/milestones{/number}","notifications_url":"https://api.github.com/repos/prometheus/prometheus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prometheus/prometheus/labels{/name}","releases_url":"https://api.github.com/repos/prometheus/prometheus/releases{/id}","deployments_url":"https://api.github.com/repos/prometheus/prometheus/deployments","created_at":"2012-11-24T11:14:12Z","updated_at":"2018-09-05T15:59:13Z","pushed_at":"2018-09-05T16:52:39Z","git_url":"git://github.com/prometheus/prometheus.git","ssh_url":"git@github.com:prometheus/prometheus.git","clone_url":"https://github.com/prometheus/prometheus.git","svn_url":"https://github.com/prometheus/prometheus","homepage":"https://prometheus.io/","size":40517,"stargazers_count":18633,"watchers_count":18633,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2482,"mirror_url":null,"archived":false,"open_issues_count":286,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2482,"open_issues":286,"watchers":18633,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/4513"},"html":{"href":"https://github.com/prometheus/prometheus/pull/4513"},"issue":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/4513"},"comments":{"href":"https://api.github.com/repos/prometheus/prometheus/issues/4513/comments"},"review_comments":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/4513/comments"},"review_comment":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prometheus/prometheus/pulls/4513/commits"},"statuses":{"href":"https://api.github.com/repos/prometheus/prometheus/statuses/94a1ba6868c420a215b12f3776fa09a4fa6a5535"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cstyan"}}