{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/4232","repository_url":"https://api.github.com/repos/prometheus/prometheus","labels_url":"https://api.github.com/repos/prometheus/prometheus/issues/4232/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/prometheus/issues/4232/comments","events_url":"https://api.github.com/repos/prometheus/prometheus/issues/4232/events","html_url":"https://github.com/prometheus/prometheus/pull/4232","id":330164637,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMjM4MzAx","number":4232,"title":"Wrong result with rate/irate functions.","user":{"login":"gywndi","id":7335357,"node_id":"MDQ6VXNlcjczMzUzNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/7335357?v=4","gravatar_id":"","url":"https://api.github.com/users/gywndi","html_url":"https://github.com/gywndi","followers_url":"https://api.github.com/users/gywndi/followers","following_url":"https://api.github.com/users/gywndi/following{/other_user}","gists_url":"https://api.github.com/users/gywndi/gists{/gist_id}","starred_url":"https://api.github.com/users/gywndi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gywndi/subscriptions","organizations_url":"https://api.github.com/users/gywndi/orgs","repos_url":"https://api.github.com/users/gywndi/repos","events_url":"https://api.github.com/users/gywndi/events{/privacy}","received_events_url":"https://api.github.com/users/gywndi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-06-07T08:17:38Z","updated_at":"2018-06-07T11:00:01Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/prometheus/prometheus/pulls/4232","html_url":"https://github.com/prometheus/prometheus/pull/4232","diff_url":"https://github.com/prometheus/prometheus/pull/4232.diff","patch_url":"https://github.com/prometheus/prometheus/pull/4232.patch"},"body":"Hi~\r\n\r\nPromethues painted a strange graph with rate/irate funciton. So I checked data, and find out it decreased at a certain point, as below.\r\n```\r\n512408305 @1525061864.282 \r\n512410956 @1525061874.282 \r\n512417456 @1525061884.282 <== greater? \r\n512416256 @1525061894.282 <== less? \r\n512418830 @1525061904.282 \r\n512421378 @1525061914.282 \r\n512423749 @1525061924.282 \r\n```\r\n\r\nI have confirmed that this is a problem caused by adding the data just prior to the decline to correct the data. The data correction method is implemented differently, and the graph is shown normally.\r\n\r\nIn the case of irate, we changed the loop to calculate the data until the correct result is shown.\r\nI attached the graph before and after the change.\r\n\r\nThanks.\r\nChan.\r\n## Before ##\r\n![before](https://user-images.githubusercontent.com/7335357/41086980-809af678-6a76-11e8-93b2-dd03920dfcb8.png)\r\n## After ##\r\n![after](https://user-images.githubusercontent.com/7335357/41086981-80deb980-6a76-11e8-991a-a7372ecf215d.png)\r\n"},"comment":{"url":"https://api.github.com/repos/prometheus/prometheus/issues/comments/395380287","html_url":"https://github.com/prometheus/prometheus/pull/4232#issuecomment-395380287","issue_url":"https://api.github.com/repos/prometheus/prometheus/issues/4232","id":395380287,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTM4MDI4Nw==","user":{"login":"gywndi","id":7335357,"node_id":"MDQ6VXNlcjczMzUzNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/7335357?v=4","gravatar_id":"","url":"https://api.github.com/users/gywndi","html_url":"https://github.com/gywndi","followers_url":"https://api.github.com/users/gywndi/followers","following_url":"https://api.github.com/users/gywndi/following{/other_user}","gists_url":"https://api.github.com/users/gywndi/gists{/gist_id}","starred_url":"https://api.github.com/users/gywndi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gywndi/subscriptions","organizations_url":"https://api.github.com/users/gywndi/orgs","repos_url":"https://api.github.com/users/gywndi/repos","events_url":"https://api.github.com/users/gywndi/events{/privacy}","received_events_url":"https://api.github.com/users/gywndi/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T11:00:01Z","updated_at":"2018-06-07T11:00:01Z","author_association":"NONE","body":"You think original result is correct one?\r\nIn fact, prometheus does not know the exact time to reset.\r\nWhen a reset occurs, prometheus also estimates the data but does not output the correct result.\r\n\r\nFor positive processing, all cases where counts are decreasing should be dropped.\r\n\r\nAs I said above, this is currently a bug in mysql, and I can not guarantee that it never happens on linux metric, cpu/network."}}
{"actor":{"display_login":"gywndi"}}