Uploaded image for project: 'Evergreen'
  1. Evergreen
  2. EVG-924

track average scheduled to start time for evergreen as a whole

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v2016.11.01
    • Component/s: app
    • Labels:

      Description

      Query: Average scheduled -> start duration for a distro within a set amount of time:

      Agg Pipeline on tasks collection: 
      [
      {$match: {$start_time : {$gt : <time>, $lt : <time + time window>}, 
      {$project : {“d”: “$distro”, "diff" : {$subtract: ["$start_time", "$scheduled_time"]}, "b" : {$ceil : {$divide : ["$start_time", <duration>]}}}},
      {$group: {_id:{distro: “$d”, bucket: "$b"}, "average": {$avg: "$diff"}}}, 
      {$sort: {distro : 1, bucket : 1}},
      ])
      

      Where duration is the amount of time converted to milliseconds that would define the buckets.
      This will return the average for different times sorted in chronological order per distro, for a given time window.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shraya.ramani Shraya Ramani
              Reporter:
              shraya.ramani Shraya Ramani
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: