Browse Source

Add count_slot_usage argument for sensitivity

By default, report when a slot has less than a weekly slot
available, but allow users to specify another sensitivity.

Change-Id: I8a52d9fb39039af049f419ac31b3281d6b057dac
Thierry Carrez 5 months ago
parent
commit
36c57a9970
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      tools/count_slot_usage.py

+ 6
- 1
tools/count_slot_usage.py View File

@@ -51,7 +51,7 @@ def main():
51 51
 
52 52
     print("Day\tUTC Hour")
53 53
     available_slots = 2 * len(CHANNELS)
54
-    full_time_slot = available_slots - 1
54
+    full_time_slot = available_slots - args.sensitivity
55 55
     for day in WEEKDAYS:
56 56
         for hour in range(24):
57 57
             slot_usage = len(meeting_counts[hour][day])
@@ -166,6 +166,11 @@ def parse_args():
166 166
     parser.add_argument(
167 167
         '--csv', metavar='FILE_NAME',
168 168
         help='If specified, write counts to the specified CSV file')
169
+    parser.add_argument(
170
+        '--sensitivity', type=int, default=1,
171
+        help='Sensitivity of reporting. '
172
+             'Defaults to 1, which means report if no weekly slot is '
173
+             'available at the time slots considered.')
169 174
 
170 175
     args = parser.parse_args()
171 176
     return args

Loading…
Cancel
Save