Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add capability to flatdata-cpp for analysing data access patterns (#239)
Add an option to analyse data access patterns: * To provide analysis of data accessed from each resource * bytes / pages accessed * analysis of inefficient struct layout (e.g. members that are never accessed) * Performance is not an objective, this will cause significant slowdowns All of this will be a compile-time opt-in. Example of output (based on flatdata benchmark) ``` ===== flatdata debug statistics ===== Total pages: 185635 Usage statistics: benchmark.flatdata/edge_data(63.1573% of pages): bytes [count]: 160073112 out of 480219352 bytes [accessed]: 33.3333% pages [count]: 117242 out of 117241 pages [data access]: 33.3331% unused struct members: byte 0 redundant: 100% byte 1 redundant: 100% byte 2 redundant: 100% byte 3 redundant: 100% byte 4 redundant: 100% byte 5 redundant: 100% byte 6 redundant: 100% byte 7 redundant: 100% byte 16 redundant: 100% byte 17 redundant: 100% byte 18 redundant: 100% byte 19 redundant: 100% byte 20 redundant: 100% byte 21 redundant: 100% byte 22 redundant: 100% byte 23 redundant: 100% benchmark.flatdata/adjacent_edges(21.0526% of pages): bytes [count]: 160073112 out of 160073120 bytes [accessed]: 100% pages [count]: 39081 out of 39080 pages [data access]: 99.9983% unused struct members: benchmark.flatdata/nodes(15.7896% of pages): bytes [count]: 40018288 out of 120054856 bytes [accessed]: 33.3333% pages [count]: 29311 out of 29310 pages [data access]: 33.3325% unused struct members: byte 0 redundant: 100% byte 1 redundant: 100% byte 2 redundant: 100% byte 3 redundant: 100% byte 4 redundant: 100% byte 5 redundant: 100% byte 6 redundant: 100% byte 7 redundant: 100% ```
- Loading branch information