mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Merge pull request #23514 from ClickHouse/aku/perf-test-cpu-model
upload cpu model to perf test db
This commit is contained in:
commit
0b990c9519
@ -1149,20 +1149,21 @@ function upload_results
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Surprisingly, clickhouse-client doesn't understand --host 127.0.0.1:9000
|
|
||||||
# so I have to extract host and port with clickhouse-local. I tried to use
|
|
||||||
# Poco URI parser to support this in the client, but it's broken and can't
|
|
||||||
# parse host:port.
|
|
||||||
set +x # Don't show password in the log
|
set +x # Don't show password in the log
|
||||||
clickhouse-client \
|
client=(clickhouse-client
|
||||||
$(clickhouse-local --query "with '${CHPC_DATABASE_URL}' as url select '--host ' || domain(url) || ' --port ' || toString(port(url)) format TSV") \
|
# Surprisingly, clickhouse-client doesn't understand --host 127.0.0.1:9000
|
||||||
--secure \
|
# so I have to extract host and port with clickhouse-local. I tried to use
|
||||||
--user "${CHPC_DATABASE_USER}" \
|
# Poco URI parser to support this in the client, but it's broken and can't
|
||||||
--password "${CHPC_DATABASE_PASSWORD}" \
|
# parse host:port.
|
||||||
--config "right/config/client_config.xml" \
|
$(clickhouse-local --query "with '${CHPC_DATABASE_URL}' as url select '--host ' || domain(url) || ' --port ' || toString(port(url)) format TSV")
|
||||||
--database perftest \
|
--secure
|
||||||
--date_time_input_format=best_effort \
|
--user "${CHPC_DATABASE_USER}"
|
||||||
--query "
|
--password "${CHPC_DATABASE_PASSWORD}"
|
||||||
|
--config "right/config/client_config.xml"
|
||||||
|
--database perftest
|
||||||
|
--date_time_input_format=best_effort)
|
||||||
|
|
||||||
|
"${client[@]}" --query "
|
||||||
insert into query_metrics_v2
|
insert into query_metrics_v2
|
||||||
select
|
select
|
||||||
toDate(event_time) event_date,
|
toDate(event_time) event_date,
|
||||||
@ -1185,6 +1186,25 @@ function upload_results
|
|||||||
format TSV
|
format TSV
|
||||||
settings date_time_input_format='best_effort'
|
settings date_time_input_format='best_effort'
|
||||||
" < report/all-query-metrics.tsv # Don't leave whitespace after INSERT: https://github.com/ClickHouse/ClickHouse/issues/16652
|
" < report/all-query-metrics.tsv # Don't leave whitespace after INSERT: https://github.com/ClickHouse/ClickHouse/issues/16652
|
||||||
|
|
||||||
|
# Upload some run attributes. I use this weird form because it is the same
|
||||||
|
# form that can be used for historical data when you only have compare.log.
|
||||||
|
cat compare.log \
|
||||||
|
| sed -n '
|
||||||
|
s/.*Model name:[[:space:]]\+\(.*\)$/metric lscpu-model-name \1/p;
|
||||||
|
s/.*L1d cache:[[:space:]]\+\(.*\)$/metric lscpu-l1d-cache \1/p;
|
||||||
|
s/.*L1i cache:[[:space:]]\+\(.*\)$/metric lscpu-l1i-cache \1/p;
|
||||||
|
s/.*L2 cache:[[:space:]]\+\(.*\)$/metric lscpu-l2-cache \1/p;
|
||||||
|
s/.*L3 cache:[[:space:]]\+\(.*\)$/metric lscpu-l3-cache \1/p;
|
||||||
|
s/.*left_sha=\(.*\)$/old-sha \1/p;
|
||||||
|
s/.*right_sha=\(.*\)/new-sha \1/p' \
|
||||||
|
| awk '
|
||||||
|
BEGIN { FS = "\t"; OFS = "\t" }
|
||||||
|
/^old-sha/ { old_sha=$2 }
|
||||||
|
/^new-sha/ { new_sha=$2 }
|
||||||
|
/^metric/ { print old_sha, new_sha, $2, $3 }' \
|
||||||
|
| "${client[@]}" --query "INSERT INTO run_attributes_v1 FORMAT TSV"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user