feat: Track the binary size for all the different platforms (#34744)

* feat: Track the binary size for all the different platforms

Signed-off-by: DK Liao <dklassic@gmail.com>

* Add target to bencher job name

Signed-off-by: DK Liao <dklassic@gmail.com>

* Update .github/workflows/bencher.yml

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: DK Liao <dklassic@gmail.com>

---------

Signed-off-by: DK Liao <dklassic@gmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
DK Liao 2025-01-20 17:41:23 +08:00 committed by GitHub
parent c070372d1e
commit 9ceb957dd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 365 additions and 153 deletions

View file

@ -19,7 +19,7 @@ def size(args):
print(size)
with open(args.bmf_output, 'w', encoding='utf-8') as f:
json.dump({
'servo': {
args.variant: {
'file-size': {
'value': float(size),
}
@ -46,6 +46,7 @@ parser = argparse.ArgumentParser("Helper commands for bencher")
subparser = parser.add_subparsers()
size_parser = subparser.add_parser("filesize", help="Returns BMF for filesize")
size_parser.add_argument("binary", help="Servo binary file")
size_parser.add_argument("variant", help="variant of the binary")
size_parser.add_argument("--bmf-output", help="BMF JSON output file", default=None)
size_parser.set_defaults(func=size)