[SERVER-67056] Create artifact metrics Created: 06/Jun/22  Updated: 29/Oct/23  Resolved: 28/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: New Feature Priority: Major - P3
Reporter: Daniel Moody Assignee: Richard Samuels (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Gantt Dependency
has to be done before SERVER-67060 Create metrics evergreen task Closed
has to be done after SERVER-67044 Create build metrics CLI interface an... Closed
has to be done after SERVER-67109 create build metrics json validator Closed
Backwards Compatibility: Fully Compatible
Sprint: Dev Platform 2022-06-27, Dev Platform 2022-07-11, Dev Platform 2022-07-25
Participants:

 Description   

All files built will be recorded by name, type and size. Name will be the platform and variant independent path (without the ixes or variant dir, e.g. build/opt/mongo/db/libtest.so -> mongo/db/test ) similar to how SCons internally uniquely identifies nodes. The “type” will be a set of known classifiers, First coming from scons builder types if possible or otherwise something reasonable. For example such a list would include “Object”, “Library”, “Program”, “text”, “json” etc. If the type cannot be discerned, the term “unknown” will be used. Generally the extension will be used to discern the type of file, but parsing the file for other clues could also be an option in some cases. Object, Program, and Library types can have the elf data parsed on linux for additional information, otherwise the bin_metrics field will be empty. The bloaty tool can output csv for all the sections and be parsed to discover all the information needed. Some of the fields (like debug) will be the summation of similar fields (ex. .debug_info, .debug_str, .debug_*, etc).

Json Format:
 
{
    artifact_metrics: {
    total_artifiact_size: <long>(1),
    num_artifacts: <long>(1),
    artifacts:[{
        array_index: <int>(1),
        name: <str>(1),
        type: <str>(1),
        size: <long>(1),
        bin_metrics: {
            text_size: <long>(2),
            data_size: <long>(2),
            rodata_size: <long>(2),
            bss_size: <long>(2),
            debug_size: <long>(2),
            symtab_len: <long>(2),
            dyntab_len: <long>(2),
        }
    }]},
}



 Comments   
Comment by Alex Neben [ 05/Jul/22 ]

daniel.moody@mongodb.com bloaty is only in v4. Do we want to do something simpler for just v3? Maybe like binary size and some info we can get from readelf and objdump.

Generated at Thu Feb 08 06:07:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.