This pull request primarily focuses on refactoring the calculation of the acceptanceRateAverage in the MetricsViewer.vue file. The calculation is now based on the cumulative number of acceptances and suggestions, rather than the average of daily acceptance rates.
Here are the key changes:
src/components/MetricsViewer.vue: Removed the sum variable and its incrementation within the acceptanceRates map function. The acceptanceRateAverage value is no longer calculated within this function.
src/components/MetricsViewer.vue: Added a conditional to check if cumulativeNumberSuggestions is zero. If it is, acceptanceRateAverage is set to zero. Otherwise, acceptanceRateAverage is calculated based on cumulativeNumberAcceptances and cumulativeNumberSuggestions.
This pull request primarily focuses on refactoring the calculation of the
acceptanceRateAverage
in theMetricsViewer.vue
file. The calculation is now based on the cumulative number of acceptances and suggestions, rather than the average of daily acceptance rates.Here are the key changes:
src/components/MetricsViewer.vue
: Removed thesum
variable and its incrementation within theacceptanceRates
map function. TheacceptanceRateAverage
value is no longer calculated within this function.src/components/MetricsViewer.vue
: Added a conditional to check ifcumulativeNumberSuggestions
is zero. If it is,acceptanceRateAverage
is set to zero. Otherwise,acceptanceRateAverage
is calculated based oncumulativeNumberAcceptances
andcumulativeNumberSuggestions
.