{"action":"created","issue":{"url":"https://api.github.com/repos/axboe/fio/issues/222","repository_url":"https://api.github.com/repos/axboe/fio","labels_url":"https://api.github.com/repos/axboe/fio/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/axboe/fio/issues/222/comments","events_url":"https://api.github.com/repos/axboe/fio/issues/222/events","html_url":"https://github.com/axboe/fio/pull/222","id":171271459,"number":222,"title":"Make histogram samples non-cumulative","user":{"login":"cronburg","id":5374541,"avatar_url":"https://avatars.githubusercontent.com/u/5374541?v=3","gravatar_id":"","url":"https://api.github.com/users/cronburg","html_url":"https://github.com/cronburg","followers_url":"https://api.github.com/users/cronburg/followers","following_url":"https://api.github.com/users/cronburg/following{/other_user}","gists_url":"https://api.github.com/users/cronburg/gists{/gist_id}","starred_url":"https://api.github.com/users/cronburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cronburg/subscriptions","organizations_url":"https://api.github.com/users/cronburg/orgs","repos_url":"https://api.github.com/users/cronburg/repos","events_url":"https://api.github.com/users/cronburg/events{/privacy}","received_events_url":"https://api.github.com/users/cronburg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-15T21:56:09Z","updated_at":"2016-08-16T01:44:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/axboe/fio/pulls/222","html_url":"https://github.com/axboe/fio/pull/222","diff_url":"https://github.com/axboe/fio/pull/222.diff","patch_url":"https://github.com/axboe/fio/pull/222.patch"},"body":"by tracking a linked-list of the most recent histogram and differencing it when we print to the log file(s). Linked list of pointers used to minimize runtime impact on recording side, instead choosing to do subtraction on the logging (when logs get printed to file) side.\r\n\r\nThis helps cleanup `fiologparser_hist.py`, makes the log files easier to understand at a glance (the frequencies correspond to just that interval), reduces file size(s), and averts the possibility of integer overflow in the logs (for a long enough fio job).\r\n\r\nI couldn't get the existing linked list implementation to work for me (`flist.h`), but I can try again / rework this to use that if that's preferred. All I needed was a write-once, read-once singly-linked list."},"comment":{"url":"https://api.github.com/repos/axboe/fio/issues/comments/239979702","html_url":"https://github.com/axboe/fio/pull/222#issuecomment-239979702","issue_url":"https://api.github.com/repos/axboe/fio/issues/222","id":239979702,"user":{"login":"axboe","id":2619634,"avatar_url":"https://avatars.githubusercontent.com/u/2619634?v=3","gravatar_id":"","url":"https://api.github.com/users/axboe","html_url":"https://github.com/axboe","followers_url":"https://api.github.com/users/axboe/followers","following_url":"https://api.github.com/users/axboe/following{/other_user}","gists_url":"https://api.github.com/users/axboe/gists{/gist_id}","starred_url":"https://api.github.com/users/axboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axboe/subscriptions","organizations_url":"https://api.github.com/users/axboe/orgs","repos_url":"https://api.github.com/users/axboe/repos","events_url":"https://api.github.com/users/axboe/events{/privacy}","received_events_url":"https://api.github.com/users/axboe/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T01:44:38Z","updated_at":"2016-08-16T01:44:38Z","body":"Yes, you need to use the flist helpers. It's much easier to read than hand coded lists... It's not hard to do, something ala:\r\n\r\n    struct some_entry\r\n    {\r\n        struct flist_head list;\r\n        other members;\r\n    };\r\n\r\n    struct some_list\r\n    {\r\n        struct flist_head list;\r\n        other members;\r\n    };\r\n\r\n    struct some_entry entry;\r\n    struct some_list list;\r\n\r\n    INIT_FLIST_HEAD(&list.list);\r\n    flist_add(&entry.list, &list.list);`\r\n\r\nand so on. Then you can extract the first and last members through using flist_first_entry() and flist_last_entry() on &list.list. Note that for both of those, you need to ensure that flist_empty() isn't true, or it'll return garbage. Similarly, flist_last_entry() can return the first member of the list, if there is only one entry. Hope that makes sense.\r\n\r\nAdditionally, don't use ?: constructs. I hate them. They hurt readability for no good reason."}}
{"actor":{"display_login":"axboe"}}