mozilla / ActiveData

Provide high speed filtering and aggregation over data
Mozilla Public License 2.0
31 stars 20 forks source link

Query fails to count #140

Closed klahnakoski closed 5 years ago

klahnakoski commented 5 years ago
{
    "from":"task",
    "format":"list",
    "limit":1000,
    "where":{"and":[
        {"in":{"build.branch":["mozilla-central","mozilla-inbound","autoland"]}},
        {"gt":{"task.run.start_time":{"date":"2019-05-30"}}},
        {"lte":{"task.run.start_time":{"date":"2019-06-06"}}},
        {"eq":{"state":"completed"}}
    ]},
    "groupby":["run.name"],
    "select":[
        {
            "aggregate":"median",
            "name":"max_run_time",
            "value":"task.maxRunTime"
        },
        {"aggregate":"count"},
        {
            "aggregate":"sum",
            "name":"tasks_gt_pct",
            "value":{
                "then":1,
                "when":{"gt":[{"div":["action.duration","task.maxRunTime"]},0.9]}
            }
        }
    ]
}
klahnakoski commented 5 years ago

https://github.com/mozilla/ActiveData/pull/142