Opened 3 years ago

Last modified 15 months ago

#3235 new task

not efficient event stream asked by the UI

Reported by: tardyp Owned by:
Priority: minor Milestone: 0.9.+
Version: master Keywords: web, optimization
Cc:

Description

Switching to websocket allows easier debugging of the message stream:

    {"message": {"stepid": 957, "num_lines": 217, "name": "stdio", "logid": 951, "type": "s", "slug": "stdio", "complete": true}, "key": "steps/957/logs/stdio/finished"}	165	
    13:41:25.775
    {"message": {"stepid": 957, "num_lines": 218, "name": "stdio", "logid": 951, "type": "s", "slug": "stdio", "complete": true}, "key": "steps/957/logs/stdio/append"}	163	
    13:41:25.782
    {"message": {"stepid": 957, "complete_at": null, "complete": false, "buildid": 239, "number": 2, "results": null, "urls": [], "state_string": "'/bin/bash -c ...'", "hidden": false, "started_at": 1426596039, "name": "pip install -r re..."}, "key": "builds/239/steps/957/updated"}	278	
    13:41:25.790
    {"message": {"stepid": 957, "num_lines": 219, "name": "stdio", "logid": 951, "type": "s", "slug": "stdio", "complete": true}, "key": "steps/957/logs/stdio/append"}	163	
    13:41:25.799
    {"message": {"stepid": 957, "complete_at": 1426596085, "complete": true, "buildid": 239, "number": 2, "results": 0, "urls": [], "state_string": "'/bin/bash -c ...'", "hidden": false, "started_at": 1426596039, "name": "pip install -r re..."}, "key": "builds/239/steps/957/finished"}	281	
    13:41:25.822
    {"message": {"buildrequestid": 237, "complete_at": null, "complete": false, "buildslaveid": 6, "builderid": 11, "buildid": 239, "results": null, "number": 10, "masterid": 1, "state_string": "finished", "started_at": 1426596037}, "key": "builders/11/builds/10/update"}	267	
    13:41:25.876
    {"message": {"buildrequestid": 237, "complete_at": null, "complete": false, "buildslaveid": 6, "builderid": 11, "buildid": 239, "results": null, "number": 10, "masterid": 1, "state_string": "finished", "started_at": 1426596037}, "key": "builds/239/update"}	256	
    13:41:25.878
    {"message": {"buildrequestid": 237, "complete_at": 1426596085, "complete": true, "buildslaveid": 6, "builderid": 11, "buildid": 239, "results": 0, "number": 10, "masterid": 1, "state_string": "finished", "started_at": 1426596037}, "key": "builders/11/builds/10/finished"}	271	
    13:41:25.899
    {"message": {"buildrequestid": 237, "complete_at": 1426596085, "complete": true, "buildslaveid": 6, "builderid": 11, "buildid": 239, "results": 0, "number": 10, "masterid": 1, "state_string": "finished", "started_at": 1426596037}, "key": "builds/239/finished"}	260	
    13:41:25.905
    {"message": {"buildrequestid": 237, "complete_at": 1426596085, "complete": true, "builderid": 11, "waited_for": true, "claimed_at": 1426596037, "results": 0, "priority": 0, "submitted_at": 1426596037, "claimed": true, "claimed_by_masterid": 1, "buildsetid": 237}, "key": "buildrequests/237/complete"}	300	
    13:41:25.936
    {"message": {"stepid": 954, "complete_at": null, "complete": false, "buildid": 238, "number": 1, "results": null, "urls": [{"url": "https://metabuildbot.tl.intel.com/travis/#buildrequests/237", "name": "android_update-job #237"}, {"url": "https://metabuildbot.tl.intel.com/travis/#builders/11/builds/10", "name": "success: android_update-job #10"}], "state_string": "triggered android_update-job", "hidden": false, "started_at": 1426596036, "name": "trigger"}, "key": "builds/238/steps/954/updated"}	499	
    13:41:25.996
    {"message": {"stepid": 954, "complete_at": null, "complete": false, "buildid": 238, "number": 1, "results": null, "urls": [{"url": "https://metabuildbot.tl.intel.com/travis/#buildrequests/237", "name": "android_update-job #237"}, {"url": "https://metabuildbot.tl.intel.com/travis/#builders/11/builds/10", "name": "success: android_update-job #10"}], "state_string": "triggered android_update-job", "hidden": false, "started_at": 1426596036, "name": "trigger"}, "key": "builds/238/steps/954/updated"}	499	
    13:41:26.060
    {"message": {"stepid": 954, "complete_at": 1426596085, "complete": true, "buildid": 238, "number": 1, "results": 0, "urls": [{"url": "https://metabuildbot.tl.intel.com/travis/#buildrequests/237", "name": "android_update-job #237"}, {"url": "https://metabuildbot.tl.intel.com/travis/#builders/11/builds/10", "name": "success: android_update-job #10"}], "state_string": "triggered android_update-job", "hidden": false, "started_at": 1426596036, "name": "trigger"}, "key": "builds/238/steps/954/finished"}	502	
    13:41:26.117
    {"message": {"buildrequestid": 236, "complete_at": null, "complete": false, "buildslaveid": 3, "builderid": 12, "buildid": 238, "results": null, "number": 7, "masterid": 1, "state_string": "finished", "started_at": 1426596034}, "key": "builders/12/builds/7/update"}	265	
    13:41:26.224
    {"message": {"buildrequestid": 236, "complete_at": null, "complete": false, "buildslaveid": 3, "builderid": 12, "buildid": 238, "results": null, "number": 7, "masterid": 1, "state_string": "finished", "started_at": 1426596034}, "key": "builders/12/builds/7/update"}	265	
    13:41:26.226
    {"message": {"buildrequestid": 236, "complete_at": null, "complete": false, "buildslaveid": 3, "builderid": 12, "buildid": 238, "results": null, "number": 7, "masterid": 1, "state_string": "finished", "started_at": 1426596034}, "key": "builds/238/update"}	255	
    13:41:26.228
    {"message": {"buildrequestid": 236, "complete_at": 1426596085, "complete": true, "buildslaveid": 3, "builderid": 12, "buildid": 238, "results": 0, "number": 7, "masterid": 1, "state_string": "finished", "started_at": 1426596034}, "key": "builders/12/builds/7/finished"}	269	
    13:41:26.234
    {"message": {"buildrequestid": 236, "complete_at": 1426596085, "complete": true, "buildslaveid": 3, "builderid": 12, "buildid": 238, "results": 0, "number": 7, "masterid": 1, "state_string": "finished", "started_at": 1426596034}, "key": "builders/12/builds/7/finished"}	269	
    13:41:26.260
    {"message": {"buildrequestid": 236, "complete_at": 1426596085, "complete": true, "buildslaveid": 3, "builderid": 12, "buildid": 238, "results": 0, "number": 7, "masterid": 1, "state_string": "finished", "started_at": 1426596034}, "key": "builds/238/finished"}	259	
    13:41:26.263
    {"message": {"buildrequestid": 236, "complete_at": 1426596085, "complete": true, "builderid": 12, "waited_for": false, "claimed_at": 1426596034, "results": 0, "priority": 0, "submitted_at": 1426596034, "claimed": true, "claimed_by_masterid": 1, "buildsetid": 236}, "key": "buildrequests/236/complete"}	301	
    13:41:26.284
    {"message": {"bsid": 236, "complete_at": 1426596085, "submitted_at": 1426596034, "sourcestamps": [{"project": "", "ssid": 91, "repository": "ssh://sys_bbmain@android.intel.com:29418/a/buildbot/android_update", "created_at": 1426241484, "patch": null, "codebase": "android_update", "branch": "", "revision": ""}], "results": 0, "reason": "A build was forced by 'user': force build", "external_idstring": null, "complete": true}, "key": "buildsets/236/complete"}	460	
    13:41:26.300

    1
    {"message": {"stepid": 957, "complete_at": null, "complete": false, "buildid": 239, "number": 2, "results": null, "urls": [], "state_string": "pending", "hidden": false, "started_at": 1426596039, "name": "pip install -r re..."}, "key": "builds/239/steps/957/started"}
    Name
    Path

We can see several bottlenecks.

  • Messages are sent twice: probably because they are listen via several mean, e.g build/*/* and build/1/*
  • lots of repeated information in json due to use of dictionaries.

as our messages are completly specified, this might be a good idea to use an optional binary serialization like protobuf or amp, which are capable of ommiting attribute name by means of shared specification.

Change History (1)

Note: See TracTickets for help on using tickets.