Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A small reporting hack #3621

Merged
merged 4 commits into from
May 13, 2024
Merged

Conversation

dbutenhof
Copy link
Member

I'd considered some way to report dataset create/upload statistics based on a date range, but never got around to it. Today, writing up the draft report for April, I of course didn't have a report "for April", and pasted in one from April 25...

And then thought, well, how hard would it be to add --since and --until to set the range?

It's not perfect, but it's a potentially useful twist. If you like it, we can merge it; if not, maybe some evening or weekend I'll get around to working on it some more.

$ pbench-report-generator --statistics=creation --since 2024-04-01 --until 2024-05-01
Dataset statistics by creation date:
  540 since 2024-04-01 00:00 until 2024-05-01 00:00
    540 in year 2024
    540 in month April 2024
    131 in week April 23 to April 30
    8 on 30 April 2024
 Total by year:
    2024:      540
 Total by month of year:
    Apr:      540
 Total by day of month:
    02:       25    03:       26    04:        2    06:        9
    07:        9    08:        3    09:       28    10:       29
    11:        9    12:       23    13:       47    14:       29
    15:       33    16:       24    17:       31    18:        6
    19:        2    20:       38    21:       36    23:       31
    24:       30    25:       11    26:        4    27:       23
    28:       23    29:        1    30:        8
 Total by day of week:
    Mon:       37    Tue:      116    Wed:      116    Thu:       28
    Fri:       29    Sat:      117    Sun:       97
 Total by hour of day:
    00:       24    01:       12    02:       10    03:       14
    04:       32    05:       51    06:       34    07:       14
    08:       26    09:       31    10:       30    11:       29
    12:       31    13:       38    14:       19    15:       26
    16:       17    17:       17    18:       17    19:       13
    20:       11    21:       19    22:       12    23:       13

I'd considered some way to report dataset create/upload statistics based on a
date range, but never got around to it. Today, writing up the draft report for
April, I of course didn't have a report "for April", and pasted in one from
April 25...

And then thought, well, how hard would it be to add `--since` and `--until` to
set the range?

It's not perfect, but it's a potentially useful twist. If you like it, we can
merge it; if not, maybe some evening or weekend I'll get around to working
on it some more.

```
$ pbench-report-generator --statistics=creation --since 2024-04-01 --until 2024-05-01
Dataset statistics by creation date:
  540 since 2024-04-01 00:00 until 2024-05-01 00:00
    540 in year 2024
    540 in month April 2024
    131 in week April 23 to April 30
    8 on 30 April 2024
 Total by year:
    2024:      540
 Total by month of year:
    Apr:      540
 Total by day of month:
    02:       25    03:       26    04:        2    06:        9
    07:        9    08:        3    09:       28    10:       29
    11:        9    12:       23    13:       47    14:       29
    15:       33    16:       24    17:       31    18:        6
    19:        2    20:       38    21:       36    23:       31
    24:       30    25:       11    26:        4    27:       23
    28:       23    29:        1    30:        8
 Total by day of week:
    Mon:       37    Tue:      116    Wed:      116    Thu:       28
    Fri:       29    Sat:      117    Sun:       97
 Total by hour of day:
    00:       24    01:       12    02:       10    03:       14
    04:       32    05:       51    06:       34    07:       14
    08:       26    09:       31    10:       30    11:       29
    12:       31    13:       38    14:       19    15:       26
    16:       17    17:       17    18:       17    19:       13
    20:       11    21:       19    22:       12    23:       13
```
@dbutenhof dbutenhof added Server Operations Related to operation and monitoring of a service labels May 7, 2024
@dbutenhof dbutenhof requested a review from webbnh May 7, 2024 23:26
@dbutenhof dbutenhof self-assigned this May 7, 2024
webbnh

This comment was marked as resolved.

webbnh

This comment was marked as resolved.

```
$ pbench-report-generator --statistics creation --since 2024-05-01 --until 2024-06-01
Dataset statistics by creation date:
 123 from 2024-05-01 06:03 to 2024-05-07 09:15
    0 in week May 24 to May 31
    0 on 31 May 2024
```
webbnh

This comment was marked as resolved.

Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dbutenhof dbutenhof merged commit 19957c2 into distributed-system-analysis:main May 13, 2024
4 checks passed
@dbutenhof dbutenhof deleted the statrange branch May 13, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Operations Related to operation and monitoring of a service Server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants