{"action":"created","issue":{"url":"https://api.github.com/repos/getlantern/lantern/issues/2152","labels_url":"https://api.github.com/repos/getlantern/lantern/issues/2152/labels{/name}","comments_url":"https://api.github.com/repos/getlantern/lantern/issues/2152/comments","events_url":"https://api.github.com/repos/getlantern/lantern/issues/2152/events","html_url":"https://github.com/getlantern/lantern/issues/2152","id":53916280,"number":2152,"title":"Either user data or country data is wrong","user":{"login":"myleshorton","id":1143966,"avatar_url":"https://avatars.githubusercontent.com/u/1143966?v=3","gravatar_id":"","url":"https://api.github.com/users/myleshorton","html_url":"https://github.com/myleshorton","followers_url":"https://api.github.com/users/myleshorton/followers","following_url":"https://api.github.com/users/myleshorton/following{/other_user}","gists_url":"https://api.github.com/users/myleshorton/gists{/gist_id}","starred_url":"https://api.github.com/users/myleshorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myleshorton/subscriptions","organizations_url":"https://api.github.com/users/myleshorton/orgs","repos_url":"https://api.github.com/users/myleshorton/repos","events_url":"https://api.github.com/users/myleshorton/events{/privacy}","received_events_url":"https://api.github.com/users/myleshorton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/getlantern/lantern/labels/P2","name":"P2","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/getlantern/lantern/milestones/64","labels_url":"https://api.github.com/repos/getlantern/lantern/milestones/64/labels","id":779013,"number":64,"title":"Short-term","description":"","creator":{"login":"scouttle","id":245240,"avatar_url":"https://avatars.githubusercontent.com/u/245240?v=3","gravatar_id":"","url":"https://api.github.com/users/scouttle","html_url":"https://github.com/scouttle","followers_url":"https://api.github.com/users/scouttle/followers","following_url":"https://api.github.com/users/scouttle/following{/other_user}","gists_url":"https://api.github.com/users/scouttle/gists{/gist_id}","starred_url":"https://api.github.com/users/scouttle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scouttle/subscriptions","organizations_url":"https://api.github.com/users/scouttle/orgs","repos_url":"https://api.github.com/users/scouttle/repos","events_url":"https://api.github.com/users/scouttle/events{/privacy}","received_events_url":"https://api.github.com/users/scouttle/received_events","type":"User","site_admin":false},"open_issues":130,"closed_issues":8,"state":"open","created_at":"2014-09-04T20:45:49Z","updated_at":"2015-01-09T21:22:08Z","due_on":"2015-03-02T08:00:00Z","closed_at":null},"comments":9,"created_at":"2015-01-09T21:22:08Z","updated_at":"2015-01-09T22:45:13Z","closed_at":null,"body":"There are numbers that contradict each other, making it appear we have issues with our data. For example, the following two queries return drastically different results:\r\n\r\nSELECT STRING(DATE(SEC_TO_TIMESTAMP(FLOOR(TIMESTAMP_TO_SEC(_ts) / 60 / 60 / 24 / 7) * 60 * 60 *24 * 7))) AS week, MAX(gauge.userOnline) AS online\r\nFROM statshub.country\r\nWHERE _dim == 'total'\r\nGROUP BY week\r\nORDER BY week DESC\r\n\r\nSELECT STRING(DATE(SEC_TO_TIMESTAMP(week * 60 * 60 * 24 * 7))) AS week, count(*) as num_instances\r\nFROM\r\n(SELECT FLOOR(TIMESTAMP_TO_SEC(_ts) / 60 / 60 / 24 / 7) AS week, _dim AS instance\r\nFROM statshub.user\r\nWHERE gauge.bpsGotten > 0 AND _dim <> 'total'\r\nGROUP BY week, instance) A\r\nGROUP BY week\r\nORDER BY week DESC"},"comment":{"url":"https://api.github.com/repos/getlantern/lantern/issues/comments/69413027","html_url":"https://github.com/getlantern/lantern/issues/2152#issuecomment-69413027","issue_url":"https://api.github.com/repos/getlantern/lantern/issues/2152","id":69413027,"user":{"login":"oxtoacart","id":5000654,"avatar_url":"https://avatars.githubusercontent.com/u/5000654?v=3","gravatar_id":"","url":"https://api.github.com/users/oxtoacart","html_url":"https://github.com/oxtoacart","followers_url":"https://api.github.com/users/oxtoacart/followers","following_url":"https://api.github.com/users/oxtoacart/following{/other_user}","gists_url":"https://api.github.com/users/oxtoacart/gists{/gist_id}","starred_url":"https://api.github.com/users/oxtoacart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxtoacart/subscriptions","organizations_url":"https://api.github.com/users/oxtoacart/orgs","repos_url":"https://api.github.com/users/oxtoacart/repos","events_url":"https://api.github.com/users/oxtoacart/events{/privacy}","received_events_url":"https://api.github.com/users/oxtoacart/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T22:45:13Z","updated_at":"2015-01-09T22:45:13Z","body":"Another thing that accounts for the discrepancy is that the concurrent users number is actually concurrent Lantern instances (an approximation of users), whereas the bytesGotten/bytesGiven figure is actual users.  If users run multiple instance or (as is likely given some of the problems we've seen in the field) users don't have a user ID assigned to them, the user's figure will differ from the instances figure."}}