From 16485daeb5638f9da11385340e58c47cd355cdca Mon Sep 17 00:00:00 2001 From: Lucille Delisle Date: Sat, 29 Jun 2024 16:50:20 +0200 Subject: [PATCH] if no_version is set do not split by version --- CHANGELOG.md | 2 ++ parts/22-query.sh | 29 +++++++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 613d685..7ae5225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ - Added: - query tools-usage (like tools-usage-per-month but for a year or for whole history) by @lldelisle +- Fixed: + - query tools-usage-per-month when 'no_version' was used there were still one line per version. # 22 diff --git a/parts/22-query.sh b/parts/22-query.sh index 499deaf..88576fc 100644 --- a/parts/22-query.sh +++ b/parts/22-query.sh @@ -5375,26 +5375,26 @@ query_tools-usage-per-month() { ##? [--startmonth=-] [--endmonth=-] [--endmonth=] [--short_tool_id] [ Tools Usage Tracking: cpu-hours, cpu-years and nb_users for specific tools (optionally in a given year). $ gxadmin query tools-usage --super_short_tool_id --no_version --tools bowtie2,Cut1 2023 + cpu_hours | cpu_years | tool_id | nb_users + -----------+-----------+---------+---------- + 4631.91 | 0.53 | bowtie2 | 7 + 0.24 | 0.00 | Cut1 | 6 + (2 rows) EOF if [[ -n $arg_year ]]; then filter_by_year="AND date_trunc('year', job.create_time AT TIME ZONE 'UTC') = '$arg_year-01-01'::date" @@ -5564,6 +5569,6 @@ query_tools-usage() { ##? [year] [--tools=] [--short_tool_id] [ $filter_tool $filter_by_year GROUP BY - tool_id + $tool_id EOF }