commercetest / commercetest/nlnet

Return performance data structure rather than sharing a global data structure

Open
#78 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Context
In #69 and #76 we've added performance measurements. They currently communicate the performance metrics using a shared structure `performance_records = []` and also the result is ignored by the caller in `tests/performance_comparison.py`.

- If the returned result isn't valuable as indicated by this line, why are we returning it? ` _ = measure_performance(test_runner_function, clone_dir)`
- let's also return the performance_records directly rather than having code coupled with a shared data structure (which then needs re-initialising each time that `measure_performance(...)` is called.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in tests/performance_comparison.py and trace measure_performance(test_runner_function, clone_dir), including the current performance_records usage and ignored return value. Update the flow so performance data is returned directly and consumed by the caller, without relying on a shared structure or reinitializing it on each call.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.