Closed Bug 1608136 Opened 6 years ago Closed 6 years ago

visualmetrics.py broken on convert call on macOS

Categories

(Testing :: Raptor, defect, P2)

Version 3
defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: tarek, Assigned: tarek)

References

Details

Attachments

(1 file)

when visualmetrics is processing the data for the contentful speed index it breaks
with all versions of ImageMagick (6.x, 7.x) because it expects this command:

convert /Users/tarek/Dev/gecko/mozilla-central-opt/browsertime-results/google.com/2020-01-09T143331+0100/pages/google.com/data/video/images/3/ms_001400.png -canny 2x2+8%+8% -define histogram:unique-colors=true -format %c histogram:info:-'

to return something like:

     80883: (0,0,0) #000000 0
       317: (65535,65535,65535) #FFFFFF 255

but it returns grayscales:

     80883: (0,0,0) #000000 gray(0)
       317: (65535,65535,65535) #FFFFFF gray(255)

The fix is to convert the grayscale to an int in there.

Traceback (most recent call last):
  File "/Users/tarek/Dev/gecko/mozilla-central-opt/tools/browsertime/node_modules/browsertime/vendor/visualmetrics.py", line 1909, in main
    options.herodata)
  File "/Users/tarek/Dev/gecko/mozilla-central-opt/tools/browsertime/node_modules/browsertime/vendor/visualmetrics.py", line 1330, in calculate_visual_metrics
    value, value_progress = calculate_contentful_speed_index(progress, dirs)
  File "/Users/tarek/Dev/gecko/mozilla-central-opt/tools/browsertime/node_modules/browsertime/vendor/visualmetrics.py", line 1493, in calculate_contentful_speed_index
    value  = int(output.split()[7].split(':')[0])
ValueError: invalid literal for int() with base 10: 'gray(255)'
``
Priority: -- → P2

The convert output is now parsed in a more robust manner.

let's not merge this yet

we're waiting on two changes by Sean before pinning again here

Flags: needinfo?(sefeng)
Pushed by tziade@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14bfbc8cc38d Fixed ContentfulSpeedIndex extraction r=sparky
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: