Skip to content

Commit

Permalink
[hud][ch] Viable strict lag query (#5606)
Browse files Browse the repository at this point in the history
  • Loading branch information
clee2000 committed Aug 28, 2024
1 parent f9b6344 commit 15a9c4e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
5 changes: 3 additions & 2 deletions torchci/clickhouse_queries/strict_lag_sec/params.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"repo": "String",
"head": "String",
"repo": "String"
}
"owner": "String"
}
23 changes: 11 additions & 12 deletions torchci/clickhouse_queries/strict_lag_sec/query.sql
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
-- !!! Query is not converted to CH syntax yet. Delete this line when it gets converted
WITH master as (
SELECT
PARSE_TIMESTAMP_ISO8601(push.head_commit.timestamp) as master
push.head_commit.timestamp as master
FROM
push
WHERE
push.ref = :head
AND push.repository.owner.name = 'pytorch'
AND push.repository.name = :repo
AND push.head_commit is not null
push.ref = {head: String }
AND push.repository.owner.name = {owner: String }
AND push.repository.name = {repo: String }
AND push.head_commit.id != ''
ORDER BY
push._event_time desc
push.head_commit.timestamp desc
LIMIT
1
), strict as (
SELECT
PARSE_TIMESTAMP_ISO8601(push.head_commit.timestamp) as strict
push.head_commit.timestamp as strict
FROM
push
WHERE
push.ref = 'refs/heads/viable/strict'
AND push.repository.owner.name = 'pytorch'
AND push.repository.name = :repo
AND push.head_commit is not null
AND push.repository.owner.name = {owner: String }
AND push.repository.name = {repo: String }
AND push.head_commit.id != ''
ORDER BY
push._event_time desc
push.head_commit.timestamp desc
LIMIT
1
)
Expand Down
11 changes: 10 additions & 1 deletion torchci/pages/metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,17 @@ export default function Page() {
queryName={"strict_lag_sec"}
metricName={"strict_lag_sec"}
valueRenderer={(value) => durationDisplay(value)}
queryParams={[]}
queryParams={
useClickHouse
? {
repo: "pytorch",
owner: "pytorch", // Not a parameter for the rockset query
head: "refs/heads/main",
}
: []
}
badThreshold={(value) => value > 60 * 60 * 6} // 6 hours
useClickHouse={useClickHouse}
/>
<ScalarPanel
title={"# disabled tests"}
Expand Down

0 comments on commit 15a9c4e

Please sign in to comment.