Skip to content

Commit

Permalink
Merge pull request #2587 from chusloj/profiling_new_tests_bug
Browse files Browse the repository at this point in the history
Fix bugs in profiling suite
  • Loading branch information
MattHJensen authored Apr 27, 2021
2 parents a65f2c6 + 18cf226 commit cb0297d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion taxcalc/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,14 @@ def pytest_sessionfinish(session):
tests_path = os.path.abspath(os.path.dirname(__file__))

new_stats_df = get_session_results_df(session)
# move test_id from index into unique column
new_stats_df.reset_index(inplace=True)
old_stats_df = pandas.read_csv(os.path.join(tests_path, 'test_stats_benchmark.csv'))

merge_df = new_stats_df.merge(old_stats_df, on=['test_id'], how='inner')
merge_df = new_stats_df.merge(old_stats_df, on=['test_id'], how='left')
# time diff for new tests is set to 0
merge_df['time_diff'] = merge_df['duration_ms_x'] - merge_df['duration_ms_y']
merge_df['time_diff'] = merge_df['time_diff'].fillna(0)

tol = 1.0 # choose tolerance in seconds
tol *= 1000
Expand Down

0 comments on commit cb0297d

Please sign in to comment.