fix: Fix snapshots handling by Pijukatel · Pull Request #692 · apify/crawlee-python

added 4 commits

November 12, 2024 16:42
Aditional reverse was changing order of snapshots and the rest of code expected latest snapshots last.
Simplified ratio calculation.
Remove fake 0.001s for zero timed measurements. Snapshot of zero duration should not contribute to ratio calculation.
exploring order of samples and the lack of guarantee of their ordering
Original with extra debug
-Ensure time ordering.
-Remove fake time weight for samples from same time.
-Remove unnecesary reversing of snapshot.
Add test for memory and cpu snapshot ordering.

@github-actions github-actions bot added t-tooling

Issues with this label are in the ownership of the tooling team.

tested

Temporary label used only programatically for some analytics.

labels

Nov 13, 2024

github-actions[bot]

@Pijukatel

bisect.insort does not support 'key' keyword untill python 3.10
sortedcollections are already in part of project, so no extra dependency

@Pijukatel

@vdusek vdusek changed the title fix: Snapshots handling fix: Fix snapshots handling

Nov 14, 2024

vdusek

@Pijukatel

Remove unused compute_weighted_avg and tests.

@Pijukatel @vdusek

Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>

janbuchar

@Pijukatel

janbuchar