def test_calculate_experiences(): commits = [ repository.Commit( node="commit1", author="author1", desc="commit1", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug="123", backedoutby="", author_email="*****@*****.**", files=["dom/file1.cpp", "apps/file1.jsm"], file_copies={}, reviewers=("reviewer1", "reviewer2"), ), repository.Commit( node="commit2", author="author2", desc="commit2", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug="123", backedoutby="", author_email="*****@*****.**", files=["dom/file1.cpp"], file_copies={}, reviewers=("reviewer1", ), ), repository.Commit( node="commit3", author="author1", desc="commit3", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug="123", backedoutby="", author_email="*****@*****.**", files=["dom/file2.cpp", "apps/file1.jsm"], file_copies={}, reviewers=("reviewer2", ), ), repository.Commit( node="commit4", author="author2", desc="commit4", date=datetime(2019, 1, 1), pushdate=datetime(2020, 1, 1), bug="123", backedoutby="", author_email="*****@*****.**", files=["dom/file1.cpp", "apps/file2.jsm"], file_copies={}, reviewers=("reviewer1", "reviewer2"), ), repository.Commit( node="commit5", author="author3", desc="commit5", date=datetime(2019, 1, 1), pushdate=datetime(2020, 1, 2), bug="123", backedoutby="", author_email="*****@*****.**", files=["dom/file1.cpp"], file_copies={"dom/file1.cpp": "dom/file1copied.cpp"}, reviewers=("reviewer3", ), ), repository.Commit( node="commit6", author="author3", desc="commit6", date=datetime(2019, 1, 1), pushdate=datetime(2020, 1, 3), bug="123", backedoutby="", author_email="*****@*****.**", files=["dom/file1.cpp", "dom/file1copied.cpp"], file_copies={}, reviewers=("reviewer3", ), ), ] repository.path_to_component = { "dom/file1.cpp": "Core::DOM", "dom/file1copied.cpp": "Core::DOM", "dom/file2.cpp": "Core::Layout", "apps/file1.jsm": "Firefox::Boh", "apps/file2.jsm": "Firefox::Boh", } repository.calculate_experiences(commits) assert repository.experiences_by_commit["total"]["author"]["commit1"] == 0 assert repository.experiences_by_commit["total"]["author"]["commit2"] == 0 assert repository.experiences_by_commit["total"]["author"]["commit3"] == 1 assert repository.experiences_by_commit["total"]["author"]["commit4"] == 1 assert repository.experiences_by_commit["total"]["author"]["commit5"] == 0 assert repository.experiences_by_commit["total"]["author"]["commit6"] == 1 assert repository.experiences_by_commit["90_days"]["author"][ "commit1"] == 0 assert repository.experiences_by_commit["90_days"]["author"][ "commit2"] == 0 assert repository.experiences_by_commit["90_days"]["author"][ "commit3"] == 1 assert repository.experiences_by_commit["90_days"]["author"][ "commit4"] == 0 assert repository.experiences_by_commit["90_days"]["author"][ "commit5"] == 0 assert repository.experiences_by_commit["90_days"]["author"][ "commit6"] == 1 assert repository.experiences_by_commit["total"]["reviewer"][ "commit1"] == 0 assert repository.experiences_by_commit["total"]["reviewer"][ "commit2"] == 1 assert repository.experiences_by_commit["total"]["reviewer"][ "commit3"] == 1 assert repository.experiences_by_commit["total"]["reviewer"][ "commit4"] == 4 assert repository.experiences_by_commit["total"]["reviewer"][ "commit5"] == 0 assert repository.experiences_by_commit["total"]["reviewer"][ "commit6"] == 1 assert repository.experiences_by_commit["90_days"]["reviewer"][ "commit1"] == 0 assert repository.experiences_by_commit["90_days"]["reviewer"][ "commit2"] == 1 assert repository.experiences_by_commit["90_days"]["reviewer"][ "commit3"] == 1 assert repository.experiences_by_commit["90_days"]["reviewer"][ "commit4"] == 0 assert repository.experiences_by_commit["90_days"]["reviewer"][ "commit5"] == 0 assert repository.experiences_by_commit["90_days"]["reviewer"][ "commit6"] == 1 assert repository.experiences_by_commit["total"]["file"]["commit1"] == 0 assert repository.experiences_by_commit["total"]["file"]["commit2"] == 1 assert repository.experiences_by_commit["total"]["file"]["commit3"] == 1 assert repository.experiences_by_commit["total"]["file"]["commit4"] == 2 assert repository.experiences_by_commit["total"]["file"]["commit5"] == 3 assert repository.experiences_by_commit["total"]["file"]["commit6"] == 4 assert repository.experiences_by_commit["90_days"]["file"]["commit1"] == 0 assert repository.experiences_by_commit["90_days"]["file"]["commit2"] == 1 assert repository.experiences_by_commit["90_days"]["file"]["commit3"] == 1 assert repository.experiences_by_commit["90_days"]["file"]["commit4"] == 0 assert repository.experiences_by_commit["90_days"]["file"]["commit5"] == 1 assert repository.experiences_by_commit["90_days"]["file"]["commit6"] == 2 assert repository.experiences_by_commit["total"]["directory"][ "commit1"] == 0 assert repository.experiences_by_commit["total"]["directory"][ "commit2"] == 1 assert repository.experiences_by_commit["total"]["directory"][ "commit3"] == 2 assert repository.experiences_by_commit["total"]["directory"][ "commit4"] == 3 assert repository.experiences_by_commit["total"]["directory"][ "commit5"] == 4 assert repository.experiences_by_commit["total"]["directory"][ "commit6"] == 5 assert repository.experiences_by_commit["90_days"]["directory"][ "commit1"] == 0 assert repository.experiences_by_commit["90_days"]["directory"][ "commit2"] == 1 assert repository.experiences_by_commit["90_days"]["directory"][ "commit3"] == 2 assert repository.experiences_by_commit["90_days"]["directory"][ "commit4"] == 0 assert repository.experiences_by_commit["90_days"]["directory"][ "commit5"] == 1 assert repository.experiences_by_commit["90_days"]["directory"][ "commit6"] == 2 assert repository.experiences_by_commit["total"]["component"][ "commit1"] == 0 assert repository.experiences_by_commit["total"]["component"][ "commit2"] == 1 assert repository.experiences_by_commit["total"]["component"][ "commit3"] == 1 assert repository.experiences_by_commit["total"]["component"][ "commit4"] == 3 assert repository.experiences_by_commit["total"]["component"][ "commit5"] == 3 assert repository.experiences_by_commit["total"]["component"][ "commit6"] == 4 assert repository.experiences_by_commit["90_days"]["component"][ "commit1"] == 0 assert repository.experiences_by_commit["90_days"]["component"][ "commit2"] == 1 assert repository.experiences_by_commit["90_days"]["component"][ "commit3"] == 1 assert repository.experiences_by_commit["90_days"]["component"][ "commit4"] == 0 assert repository.experiences_by_commit["90_days"]["component"][ "commit5"] == 1 assert repository.experiences_by_commit["90_days"]["component"][ "commit6"] == 2
def test_touched_together_restart(monkeypatch: MonkeyPatch) -> None: test_scheduling.touched_together = None repository.path_to_component = { "dom/file1.cpp": "Core::DOM", "dom/file2.cpp": "Core::DOM", "layout/file.cpp": "Core::Layout", "dom/tests/manifest1.ini": "Core::DOM", "dom/tests/manifest2.ini": "Core::DOM", } commits = [ repository.Commit( node="commit1", author="author1", desc="commit1", pushdate=datetime(2019, 1, 1), bug_id=123, backsout=[], backedoutby="", author_email="*****@*****.**", reviewers=["reviewer1", "reviewer2"], ).set_files(["dom/file1.cpp", "dom/tests/manifest1.ini"], {}), repository.Commit( node="commitbackedout", author="author1", desc="commitbackedout", pushdate=datetime(2019, 1, 1), bug_id=123, backsout=[], backedoutby="commitbackout", author_email="*****@*****.**", reviewers=["reviewer1", "reviewer2"], ).set_files(["dom/file1.cpp", "dom/tests/manifest1.ini"], {}), repository.Commit( node="commit2", author="author2", desc="commit2", pushdate=datetime(2019, 1, 1), bug_id=123, backsout=[], backedoutby="", author_email="*****@*****.**", reviewers=["reviewer1"], ).set_files(["dom/file2.cpp", "layout/tests/manifest2.ini"], {}), repository.Commit( node="commit3", author="author1", desc="commit3", pushdate=datetime(2019, 1, 1), bug_id=123, backsout=[], backedoutby="", author_email="*****@*****.**", reviewers=["reviewer2"], ).set_files(["layout/file.cpp", "dom/tests/manifest1.ini"], {}), repository.Commit( node="commit4", author="author1", desc="commit4", pushdate=datetime(2019, 1, 1), bug_id=123, backsout=[], backedoutby="", author_email="*****@*****.**", reviewers=["reviewer1", "reviewer2"], ).set_files(["dom/file1.cpp", "dom/tests/manifest1.ini"], {}), ] commits = [c.to_dict() for c in commits] def mock_get_commits() -> List[CommitDict]: return commits monkeypatch.setattr(repository, "get_commits", mock_get_commits) update_touched_together_gen = test_scheduling.update_touched_together() next(update_touched_together_gen) update_touched_together_gen.send(Revision("commit2")) assert test_scheduling.get_touched_together("dom/file1.cpp", "dom/tests") == 1 assert test_scheduling.get_touched_together("dom/tests", "dom/file1.cpp") == 1 assert test_scheduling.get_touched_together("dom", "dom/tests/manifest1.ini") == 1 assert test_scheduling.get_touched_together("dom", "dom/tests") == 1 assert test_scheduling.get_touched_together("dom", "dom") == 0 assert test_scheduling.get_touched_together("dom/file2.cpp", "layout/tests") == 1 assert (test_scheduling.get_touched_together( "dom", "layout/tests/manifest2.ini") == 1) assert test_scheduling.get_touched_together("dom", "layout/tests") == 1 assert test_scheduling.get_touched_together("dom/file1.cpp", "dom/file2.cpp") == 0 assert test_scheduling.get_touched_together("layout/file.cpp", "dom/tests") == 0 assert test_scheduling.get_touched_together("layout", "dom/tests") == 0 try: update_touched_together_gen.send(None) except StopIteration: pass # Ensure we can still read the DB after closing. assert test_scheduling.get_touched_together("dom", "layout/tests") == 1 test_scheduling.close_touched_together_db() update_touched_together_gen = test_scheduling.update_touched_together() next(update_touched_together_gen) update_touched_together_gen.send(Revision("commit4")) assert test_scheduling.get_touched_together("dom/file1.cpp", "dom/tests") == 2 assert test_scheduling.get_touched_together("dom/tests", "dom/file1.cpp") == 2 assert test_scheduling.get_touched_together("dom", "dom/tests/manifest1.ini") == 2 assert test_scheduling.get_touched_together("dom", "dom/tests") == 2 assert test_scheduling.get_touched_together("dom", "dom") == 0 assert test_scheduling.get_touched_together("dom/file2.cpp", "layout/tests") == 1 assert (test_scheduling.get_touched_together( "dom", "layout/tests/manifest2.ini") == 1) assert test_scheduling.get_touched_together("dom", "layout/tests") == 1 assert test_scheduling.get_touched_together("dom/file1.cpp", "dom/file2.cpp") == 0 assert test_scheduling.get_touched_together("layout/file.cpp", "dom/tests") == 1 assert (test_scheduling.get_touched_together( "layout", "dom/tests/manifest1.ini") == 1) assert test_scheduling.get_touched_together("layout", "dom/tests") == 1
def test_touched_together_with_backout(monkeypatch): test_scheduling.touched_together = None repository.path_to_component = { "dom/file1.cpp": "Core::DOM", "dom/file2.cpp": "Core::DOM", "layout/file.cpp": "Core::Layout", "dom/tests/manifest1.ini": "Core::DOM", "dom/tests/manifest2.ini": "Core::DOM", } commits = [ repository.Commit( node="commit1", author="author1", desc="commit1", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer1", "reviewer2"), ).set_files(["dom/file1.cpp", "dom/tests/manifest1.ini"], {}), repository.Commit( node="commitbackedout", author="author1", desc="commitbackedout", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug_id=123, backedoutby="commitbackout", author_email="*****@*****.**", reviewers=("reviewer1", "reviewer2"), ).set_files(["dom/file1.cpp", "dom/tests/manifest1.ini"], {}), repository.Commit( node="commit2", author="author2", desc="commit2", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer1", ), ).set_files(["dom/file2.cpp", "layout/tests/manifest2.ini"], {}), ] commits = [c.to_dict() for c in commits] def mock_get_commits(): return commits monkeypatch.setattr(repository, "get_commits", mock_get_commits) update_touched_together_gen = test_scheduling.update_touched_together() next(update_touched_together_gen) update_touched_together_gen.send("commitbackedout") assert test_scheduling.get_touched_together("dom/file1.cpp", "dom/tests") == 1 assert test_scheduling.get_touched_together("dom/tests", "dom/file1.cpp") == 1 assert test_scheduling.get_touched_together("dom", "dom/tests/manifest1.ini") == 1 assert test_scheduling.get_touched_together("dom", "dom/tests") == 1 assert test_scheduling.get_touched_together("dom", "dom") == 0 assert test_scheduling.get_touched_together("dom/file2.cpp", "layout/tests") == 0 assert (test_scheduling.get_touched_together( "dom", "layout/tests/manifest2.ini") == 0) assert test_scheduling.get_touched_together("dom", "layout/tests") == 0 assert test_scheduling.get_touched_together("dom/file1.cpp", "dom/file2.cpp") == 0 assert test_scheduling.get_touched_together("layout/file.cpp", "dom/tests") == 0 assert test_scheduling.get_touched_together("layout", "dom/tests") == 0 update_touched_together_gen.send("commit2") assert test_scheduling.get_touched_together("dom/file1.cpp", "dom/tests") == 1 assert test_scheduling.get_touched_together("dom/tests", "dom/file1.cpp") == 1 assert test_scheduling.get_touched_together("dom", "dom/tests/manifest1.ini") == 1 assert test_scheduling.get_touched_together("dom", "dom/tests") == 1 assert test_scheduling.get_touched_together("dom", "dom") == 0 assert test_scheduling.get_touched_together("dom/file2.cpp", "layout/tests") == 1 assert (test_scheduling.get_touched_together( "dom", "layout/tests/manifest2.ini") == 1) assert test_scheduling.get_touched_together("dom", "layout/tests") == 1 assert test_scheduling.get_touched_together("dom/file1.cpp", "dom/file2.cpp") == 0 assert test_scheduling.get_touched_together("layout/file.cpp", "dom/tests") == 0 assert test_scheduling.get_touched_together("layout", "dom/tests") == 0
def test_calculate_experiences(): repository.path_to_component = { "dom/file1.cpp": "Core::DOM", "dom/file1copied.cpp": "Core::DOM", "dom/file2.cpp": "Core::Layout", "apps/file1.jsm": "Firefox::Boh", "apps/file2.jsm": "Firefox::Boh", } commits = { "commit1": repository.Commit( node="commit1", author="author1", desc="commit1", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer1", "reviewer2"), ).set_files(["dom/file1.cpp", "apps/file1.jsm"], {}), "commitbackedout": repository.Commit( node="commitbackedout", author="author1", desc="commitbackedout", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug_id=123, backedoutby="commitbackout", author_email="*****@*****.**", reviewers=("reviewer1", "reviewer2"), ).set_files(["dom/file1.cpp", "apps/file1.jsm"], {}), "commit2": repository.Commit( node="commit2", author="author2", desc="commit2", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer1", ), ).set_files(["dom/file1.cpp"], {}), "commit2refactoring": repository.Commit( node="commit2refactoring", author="author2", desc="commit2refactoring", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer1", ), ignored=True, ).set_files(["dom/file1.cpp"], {}), "commit3": repository.Commit( node="commit3", author="author1", desc="commit3", date=datetime(2019, 1, 1), pushdate=datetime(2019, 1, 1), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer2", ), ).set_files(["dom/file2.cpp", "apps/file1.jsm"], {}), "commit4": repository.Commit( node="commit4", author="author2", desc="commit4", date=datetime(2019, 1, 1), pushdate=datetime(2020, 1, 1), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer1", "reviewer2"), ).set_files(["dom/file1.cpp", "apps/file2.jsm"], {}), "commit5": repository.Commit( node="commit5", author="author3", desc="commit5", date=datetime(2019, 1, 1), pushdate=datetime(2020, 1, 2), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer3", ), ).set_files(["dom/file1.cpp"], {"dom/file1.cpp": "dom/file1copied.cpp"}), "commit6": repository.Commit( node="commit6", author="author3", desc="commit6", date=datetime(2019, 1, 1), pushdate=datetime(2020, 1, 3), bug_id=123, backedoutby="", author_email="*****@*****.**", reviewers=("reviewer3", ), ).set_files(["dom/file1.cpp", "dom/file1copied.cpp"], {}), } repository.calculate_experiences(commits.values(), datetime(2019, 1, 1)) assert commits["commit1"].seniority_author == 0 assert commits["commitbackedout"].seniority_author == 0 assert commits["commit2"].seniority_author == 0 assert commits["commit3"].seniority_author == 0 assert commits["commit4"].seniority_author == 86400.0 * 365 assert commits["commit5"].seniority_author == 0 assert commits["commit6"].seniority_author == 86400.0 assert commits["commit1"].touched_prev_total_author_sum == 0 assert commits["commit2"].touched_prev_total_author_sum == 0 assert commits["commit3"].touched_prev_total_author_sum == 1 assert commits["commit4"].touched_prev_total_author_sum == 1 assert commits["commit5"].touched_prev_total_author_sum == 0 assert commits["commit6"].touched_prev_total_author_sum == 1 assert commits["commit1"].touched_prev_90_days_author_sum == 0 assert commits["commit2"].touched_prev_90_days_author_sum == 0 assert commits["commit3"].touched_prev_90_days_author_sum == 1 assert commits["commit4"].touched_prev_90_days_author_sum == 0 assert commits["commit5"].touched_prev_90_days_author_sum == 0 assert commits["commit6"].touched_prev_90_days_author_sum == 1 assert commits["commit1"].touched_prev_total_reviewer_sum == 0 assert commits["commit1"].touched_prev_total_reviewer_max == 0 assert commits["commit1"].touched_prev_total_reviewer_min == 0 assert commits["commit2"].touched_prev_total_reviewer_sum == 1 assert commits["commit2"].touched_prev_total_reviewer_max == 1 assert commits["commit2"].touched_prev_total_reviewer_min == 1 assert commits["commit3"].touched_prev_total_reviewer_sum == 1 assert commits["commit3"].touched_prev_total_reviewer_max == 1 assert commits["commit3"].touched_prev_total_reviewer_min == 1 assert commits["commit4"].touched_prev_total_reviewer_sum == 4 assert commits["commit4"].touched_prev_total_reviewer_max == 2 assert commits["commit4"].touched_prev_total_reviewer_min == 2 assert commits["commit5"].touched_prev_total_reviewer_sum == 0 assert commits["commit5"].touched_prev_total_reviewer_max == 0 assert commits["commit5"].touched_prev_total_reviewer_min == 0 assert commits["commit6"].touched_prev_total_reviewer_sum == 1 assert commits["commit6"].touched_prev_total_reviewer_max == 1 assert commits["commit6"].touched_prev_total_reviewer_min == 1 assert commits["commit1"].touched_prev_90_days_reviewer_sum == 0 assert commits["commit1"].touched_prev_90_days_reviewer_max == 0 assert commits["commit1"].touched_prev_90_days_reviewer_min == 0 assert commits["commit2"].touched_prev_90_days_reviewer_sum == 1 assert commits["commit2"].touched_prev_90_days_reviewer_max == 1 assert commits["commit2"].touched_prev_90_days_reviewer_min == 1 assert commits["commit3"].touched_prev_90_days_reviewer_sum == 1 assert commits["commit3"].touched_prev_90_days_reviewer_max == 1 assert commits["commit3"].touched_prev_90_days_reviewer_min == 1 assert commits["commit4"].touched_prev_90_days_reviewer_sum == 0 assert commits["commit4"].touched_prev_90_days_reviewer_max == 0 assert commits["commit4"].touched_prev_90_days_reviewer_min == 0 assert commits["commit5"].touched_prev_90_days_reviewer_sum == 0 assert commits["commit5"].touched_prev_90_days_reviewer_max == 0 assert commits["commit5"].touched_prev_90_days_reviewer_min == 0 assert commits["commit6"].touched_prev_90_days_reviewer_sum == 1 assert commits["commit6"].touched_prev_90_days_reviewer_max == 1 assert commits["commit6"].touched_prev_90_days_reviewer_min == 1 assert commits["commit1"].touched_prev_total_file_sum == 0 assert commits["commit1"].touched_prev_total_file_max == 0 assert commits["commit1"].touched_prev_total_file_min == 0 assert commits["commit2"].touched_prev_total_file_sum == 1 assert commits["commit2"].touched_prev_total_file_max == 1 assert commits["commit2"].touched_prev_total_file_min == 1 assert commits["commit3"].touched_prev_total_file_sum == 1 assert commits["commit3"].touched_prev_total_file_max == 1 assert commits["commit3"].touched_prev_total_file_min == 0 assert commits["commit4"].touched_prev_total_file_sum == 2 assert commits["commit4"].touched_prev_total_file_max == 2 assert commits["commit4"].touched_prev_total_file_min == 0 assert commits["commit5"].touched_prev_total_file_sum == 3 assert commits["commit5"].touched_prev_total_file_max == 3 assert commits["commit5"].touched_prev_total_file_min == 3 assert commits["commit6"].touched_prev_total_file_sum == 4 assert commits["commit6"].touched_prev_total_file_max == 4 assert commits["commit6"].touched_prev_total_file_min == 3 assert commits["commit1"].touched_prev_90_days_file_sum == 0 assert commits["commit1"].touched_prev_90_days_file_max == 0 assert commits["commit1"].touched_prev_90_days_file_min == 0 assert commits["commit2"].touched_prev_90_days_file_sum == 1 assert commits["commit2"].touched_prev_90_days_file_max == 1 assert commits["commit2"].touched_prev_90_days_file_min == 1 assert commits["commit3"].touched_prev_90_days_file_sum == 1 assert commits["commit3"].touched_prev_90_days_file_max == 1 assert commits["commit3"].touched_prev_90_days_file_min == 0 assert commits["commit4"].touched_prev_90_days_file_sum == 0 assert commits["commit4"].touched_prev_90_days_file_max == 0 assert commits["commit4"].touched_prev_90_days_file_min == 0 assert commits["commit5"].touched_prev_90_days_file_sum == 1 assert commits["commit5"].touched_prev_90_days_file_max == 1 assert commits["commit5"].touched_prev_90_days_file_min == 1 assert commits["commit6"].touched_prev_90_days_file_sum == 2 assert commits["commit6"].touched_prev_90_days_file_max == 2 assert commits["commit6"].touched_prev_90_days_file_min == 1 assert commits["commit1"].touched_prev_total_directory_sum == 0 assert commits["commit1"].touched_prev_total_directory_max == 0 assert commits["commit1"].touched_prev_total_directory_min == 0 assert commits["commit2"].touched_prev_total_directory_sum == 1 assert commits["commit2"].touched_prev_total_directory_max == 1 assert commits["commit2"].touched_prev_total_directory_min == 1 assert commits["commit3"].touched_prev_total_directory_sum == 2 assert commits["commit3"].touched_prev_total_directory_max == 2 assert commits["commit3"].touched_prev_total_directory_min == 1 assert commits["commit4"].touched_prev_total_directory_sum == 3 assert commits["commit4"].touched_prev_total_directory_max == 3 assert commits["commit4"].touched_prev_total_directory_min == 2 assert commits["commit5"].touched_prev_total_directory_sum == 4 assert commits["commit5"].touched_prev_total_directory_max == 4 assert commits["commit5"].touched_prev_total_directory_min == 4 assert commits["commit6"].touched_prev_total_directory_sum == 5 assert commits["commit6"].touched_prev_total_directory_max == 5 assert commits["commit6"].touched_prev_total_directory_min == 5 assert commits["commit1"].touched_prev_90_days_directory_sum == 0 assert commits["commit1"].touched_prev_90_days_directory_max == 0 assert commits["commit1"].touched_prev_90_days_directory_min == 0 assert commits["commit2"].touched_prev_90_days_directory_sum == 1 assert commits["commit2"].touched_prev_90_days_directory_max == 1 assert commits["commit2"].touched_prev_90_days_directory_min == 1 assert commits["commit3"].touched_prev_90_days_directory_sum == 2 assert commits["commit3"].touched_prev_90_days_directory_max == 2 assert commits["commit3"].touched_prev_90_days_directory_min == 1 assert commits["commit4"].touched_prev_90_days_directory_sum == 0 assert commits["commit4"].touched_prev_90_days_directory_max == 0 assert commits["commit4"].touched_prev_90_days_directory_min == 0 assert commits["commit5"].touched_prev_90_days_directory_sum == 1 assert commits["commit5"].touched_prev_90_days_directory_max == 1 assert commits["commit5"].touched_prev_90_days_directory_min == 1 assert commits["commit6"].touched_prev_90_days_directory_sum == 2 assert commits["commit6"].touched_prev_90_days_directory_max == 2 assert commits["commit6"].touched_prev_90_days_directory_min == 2 assert commits["commit1"].touched_prev_total_component_sum == 0 assert commits["commit1"].touched_prev_total_component_max == 0 assert commits["commit1"].touched_prev_total_component_min == 0 assert commits["commit2"].touched_prev_total_component_sum == 1 assert commits["commit2"].touched_prev_total_component_max == 1 assert commits["commit2"].touched_prev_total_component_min == 1 assert commits["commit3"].touched_prev_total_component_sum == 1 assert commits["commit3"].touched_prev_total_component_max == 1 assert commits["commit3"].touched_prev_total_component_min == 0 assert commits["commit4"].touched_prev_total_component_sum == 3 assert commits["commit4"].touched_prev_total_component_max == 2 assert commits["commit4"].touched_prev_total_component_min == 2 assert commits["commit5"].touched_prev_total_component_sum == 3 assert commits["commit5"].touched_prev_total_component_max == 3 assert commits["commit5"].touched_prev_total_component_min == 3 assert commits["commit6"].touched_prev_total_component_sum == 4 assert commits["commit6"].touched_prev_total_component_max == 4 assert commits["commit6"].touched_prev_total_component_min == 4 assert commits["commit1"].touched_prev_90_days_component_sum == 0 assert commits["commit1"].touched_prev_90_days_component_max == 0 assert commits["commit1"].touched_prev_90_days_component_min == 0 assert commits["commit2"].touched_prev_90_days_component_sum == 1 assert commits["commit2"].touched_prev_90_days_component_max == 1 assert commits["commit2"].touched_prev_90_days_component_min == 1 assert commits["commit3"].touched_prev_90_days_component_sum == 1 assert commits["commit3"].touched_prev_90_days_component_max == 1 assert commits["commit3"].touched_prev_90_days_component_min == 0 assert commits["commit4"].touched_prev_90_days_component_sum == 0 assert commits["commit4"].touched_prev_90_days_component_max == 0 assert commits["commit4"].touched_prev_90_days_component_min == 0 assert commits["commit5"].touched_prev_90_days_component_sum == 1 assert commits["commit5"].touched_prev_90_days_component_max == 1 assert commits["commit5"].touched_prev_90_days_component_min == 1 assert commits["commit6"].touched_prev_90_days_component_sum == 2 assert commits["commit6"].touched_prev_90_days_component_max == 2 assert commits["commit6"].touched_prev_90_days_component_min == 2