atomicshop 2.16.22__py3-none-any.whl → 2.16.23__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of atomicshop might be problematic. Click here for more details.
- atomicshop/__init__.py +1 -1
- atomicshop/mitm/statistic_analyzer.py +6 -23
- atomicshop/mitm/statistic_analyzer_helper/moving_average_helper.py +37 -6
- {atomicshop-2.16.22.dist-info → atomicshop-2.16.23.dist-info}/METADATA +1 -1
- {atomicshop-2.16.22.dist-info → atomicshop-2.16.23.dist-info}/RECORD +8 -8
- {atomicshop-2.16.22.dist-info → atomicshop-2.16.23.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.16.22.dist-info → atomicshop-2.16.23.dist-info}/WHEEL +0 -0
- {atomicshop-2.16.22.dist-info → atomicshop-2.16.23.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -429,30 +429,13 @@ def deviation_calculator_by_moving_average(
|
|
|
429
429
|
|
|
430
430
|
if deviation_list:
|
|
431
431
|
if summary:
|
|
432
|
-
summary_deviation_list: list = []
|
|
433
432
|
for deviation in deviation_list:
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
summary_deviation_list.append({
|
|
442
|
-
'day': deviation['day'],
|
|
443
|
-
'host': deviation['host'],
|
|
444
|
-
'message': deviation['message'],
|
|
445
|
-
'value': deviation.get('value', None),
|
|
446
|
-
'ma_value': deviation.get('ma_value', None),
|
|
447
|
-
'deviation_percentage': deviation.get('deviation_percentage', None),
|
|
448
|
-
'total_entries_averaged': total_entries_averaged,
|
|
449
|
-
'median_request_size': deviation.get('median_request_size', None),
|
|
450
|
-
'median_response_size': deviation.get('median_response_size', None),
|
|
451
|
-
'mm_request_size': deviation.get('mm_request_size', None),
|
|
452
|
-
'mm_response_size': deviation.get('mm_response_size', None),
|
|
453
|
-
})
|
|
454
|
-
|
|
455
|
-
deviation_list = summary_deviation_list
|
|
433
|
+
_ = deviation.pop('check_type')
|
|
434
|
+
_ = deviation.pop('percentage')
|
|
435
|
+
_ = deviation.pop('ma_value_checked')
|
|
436
|
+
_ = deviation.pop('deviation_type')
|
|
437
|
+
_ = deviation.pop('data')
|
|
438
|
+
_ = deviation.pop('ma_data')
|
|
456
439
|
|
|
457
440
|
if output_file_path:
|
|
458
441
|
if not summary:
|
|
@@ -270,6 +270,7 @@ def compute_average_for_current_day_from_past_x_days(
|
|
|
270
270
|
ma_count = statistics.mean(host_dict['counts'])
|
|
271
271
|
ma_request_size = statistics.mean(host_dict['avg_request_sizes'])
|
|
272
272
|
ma_response_size = statistics.mean(host_dict['avg_response_sizes'])
|
|
273
|
+
mm_count = statistics.median(host_dict['counts'])
|
|
273
274
|
mm_request_size = statistics.median(host_dict['median_request_sizes'])
|
|
274
275
|
mm_response_size = statistics.median(host_dict['median_response_sizes'])
|
|
275
276
|
|
|
@@ -277,6 +278,7 @@ def compute_average_for_current_day_from_past_x_days(
|
|
|
277
278
|
'ma_count': ma_count,
|
|
278
279
|
'ma_request_size': ma_request_size,
|
|
279
280
|
'ma_response_size': ma_response_size,
|
|
281
|
+
'mm_count': mm_count,
|
|
280
282
|
'mm_request_size': mm_request_size,
|
|
281
283
|
'mm_response_size': mm_response_size,
|
|
282
284
|
'counts': host_dict['counts'],
|
|
@@ -332,8 +334,28 @@ def find_deviation_from_moving_average(
|
|
|
332
334
|
deviation_percentage = (
|
|
333
335
|
(host_moving_average_by_type - day_statistics_content_dict[check_type]) /
|
|
334
336
|
host_moving_average_by_type)
|
|
337
|
+
|
|
335
338
|
if deviation_type:
|
|
336
339
|
message = f'[{check_type}] is [{deviation_type}] the moving average.'
|
|
340
|
+
|
|
341
|
+
# Get the right moving median.
|
|
342
|
+
if check_type == 'count':
|
|
343
|
+
median_type_string: str = 'count'
|
|
344
|
+
moving_median_type_string: str = 'mm_count'
|
|
345
|
+
else:
|
|
346
|
+
median_type_string: str = check_type.replace('avg', 'median')
|
|
347
|
+
moving_median_type_string: str = check_type.replace('avg', 'mm')
|
|
348
|
+
|
|
349
|
+
# The median and the total count are None for the count, Since they are the count.
|
|
350
|
+
if check_type == 'count':
|
|
351
|
+
total_entries_averaged = None
|
|
352
|
+
median_size = None
|
|
353
|
+
else:
|
|
354
|
+
total_entries_averaged = day_statistics_content_dict['count']
|
|
355
|
+
median_size = day_statistics_content_dict[median_type_string]
|
|
356
|
+
|
|
357
|
+
moving_median_size = moving_averages_dict[host][moving_median_type_string]
|
|
358
|
+
|
|
337
359
|
deviation_list.append({
|
|
338
360
|
'day': day,
|
|
339
361
|
'host': host,
|
|
@@ -344,11 +366,10 @@ def find_deviation_from_moving_average(
|
|
|
344
366
|
'percentage': top_bottom_deviation_percentage,
|
|
345
367
|
'ma_value_checked': check_type_moving_above,
|
|
346
368
|
'deviation_percentage': deviation_percentage,
|
|
369
|
+
'total_entries_averaged': total_entries_averaged,
|
|
347
370
|
'deviation_type': deviation_type,
|
|
348
|
-
'
|
|
349
|
-
'
|
|
350
|
-
'mm_request_size': moving_averages_dict[host]['mm_request_size'],
|
|
351
|
-
'mm_response_size': moving_averages_dict[host]['mm_response_size'],
|
|
371
|
+
'median_size': median_size,
|
|
372
|
+
'mm_size': moving_median_size,
|
|
352
373
|
'data': day_statistics_content_dict,
|
|
353
374
|
'ma_data': moving_averages_dict[host]
|
|
354
375
|
})
|
|
@@ -373,9 +394,19 @@ def find_deviation_from_moving_average(
|
|
|
373
394
|
deviation_list.append({
|
|
374
395
|
'day': day,
|
|
375
396
|
'host': host,
|
|
376
|
-
'data': host_dict,
|
|
377
397
|
'message': message,
|
|
378
|
-
'
|
|
398
|
+
'value': None,
|
|
399
|
+
'ma_value': None,
|
|
400
|
+
'check_type': None,
|
|
401
|
+
'percentage': None,
|
|
402
|
+
'ma_value_checked': None,
|
|
403
|
+
'deviation_percentage': None,
|
|
404
|
+
'total_entries_averaged': None,
|
|
405
|
+
'deviation_type': 'clear',
|
|
406
|
+
'median_size': None,
|
|
407
|
+
'mm_size': None,
|
|
408
|
+
'data': host_dict,
|
|
409
|
+
'ma_data': previous_day_moving_average_dict
|
|
379
410
|
})
|
|
380
411
|
continue
|
|
381
412
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=nFFyrQAHTstcKiEqAJ9esDeQ3MmcErpmeonwOprd9VU,124
|
|
2
2
|
atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
|
|
3
3
|
atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
|
|
4
4
|
atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
|
|
@@ -131,7 +131,7 @@ atomicshop/mitm/message.py,sha256=d_sm3O_aoZf87dDQP44xOMNEG-uZBN1ZecQgMCacbZs,18
|
|
|
131
131
|
atomicshop/mitm/mitm_main.py,sha256=gA8sV7hI107OnoeedCHpy8f3zcE4vAsBc44l_VTjVFo,21622
|
|
132
132
|
atomicshop/mitm/recs_files.py,sha256=B8fSuvYXlh50LWfwLRw_bYswreTjmdZLuHJzbDC5Gss,2930
|
|
133
133
|
atomicshop/mitm/shared_functions.py,sha256=hplm98tz8pgJ4WHUVI9sf_oVqUM2KJ1Y2pD6EFSb8P0,1879
|
|
134
|
-
atomicshop/mitm/statistic_analyzer.py,sha256=
|
|
134
|
+
atomicshop/mitm/statistic_analyzer.py,sha256=c1Iv9qGy6_IGg95VxhRQ06sleygLdJi_B13MjZ0FJAU,26183
|
|
135
135
|
atomicshop/mitm/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
136
136
|
atomicshop/mitm/engines/create_module_template.py,sha256=tRjVSm1sD6FzML71Qbuwvita0qsusdFGm8NZLsZ-XMs,4853
|
|
137
137
|
atomicshop/mitm/engines/create_module_template_example.py,sha256=X5xhvbV6-g9jU_bQVhf_crZmaH50LRWz3bS-faQ18ds,489
|
|
@@ -145,7 +145,7 @@ atomicshop/mitm/engines/__reference_general/recorder___reference_general.py,sha2
|
|
|
145
145
|
atomicshop/mitm/engines/__reference_general/responder___reference_general.py,sha256=IUyQYMPeEhIARfALWiKPFeXagSQD6lRzAxUdi4ZIT88,7010
|
|
146
146
|
atomicshop/mitm/statistic_analyzer_helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
147
147
|
atomicshop/mitm/statistic_analyzer_helper/analyzer_helper.py,sha256=pk6L1t1ea1kvlBoR9QEJptOmaX-mumhwLsP2GCKukbk,5920
|
|
148
|
-
atomicshop/mitm/statistic_analyzer_helper/moving_average_helper.py,sha256=
|
|
148
|
+
atomicshop/mitm/statistic_analyzer_helper/moving_average_helper.py,sha256=XkJBAKD20j4rBpTWuhRJG3ONDWsktOh3PfOqzVDSORo,17883
|
|
149
149
|
atomicshop/monitor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
150
|
atomicshop/monitor/change_monitor.py,sha256=K5NlVp99XIDDPnQQMdru4BDmua_DtcDIhVAzkTOvD5s,7673
|
|
151
151
|
atomicshop/monitor/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -309,8 +309,8 @@ atomicshop/wrappers/socketw/ssl_base.py,sha256=kmiif84kMhBr5yjQW17p935sfjR5JKG0L
|
|
|
309
309
|
atomicshop/wrappers/socketw/statistics_csv.py,sha256=V_m1D0KpizQox3IEWp2AUcncwWy5kG25hbFrc-mBSJE,3029
|
|
310
310
|
atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
311
311
|
atomicshop/wrappers/winregw/winreg_network.py,sha256=bQ8Jql8bVGBJ0dt3VQ56lga_1LBOMLI3Km_otvvbU6c,7138
|
|
312
|
-
atomicshop-2.16.
|
|
313
|
-
atomicshop-2.16.
|
|
314
|
-
atomicshop-2.16.
|
|
315
|
-
atomicshop-2.16.
|
|
316
|
-
atomicshop-2.16.
|
|
312
|
+
atomicshop-2.16.23.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
313
|
+
atomicshop-2.16.23.dist-info/METADATA,sha256=Ye4Ij67GZEdRL0YppIdiL1YjtpKcJWWbIzIG3ldpxsg,10473
|
|
314
|
+
atomicshop-2.16.23.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
315
|
+
atomicshop-2.16.23.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
316
|
+
atomicshop-2.16.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|