Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/60 #61

Merged
merged 2 commits into from
Oct 22, 2022
Merged

Fix/60 #61

merged 2 commits into from
Oct 22, 2022

Conversation

js-dieu
Copy link
Collaborator

@js-dieu js-dieu commented Oct 16, 2022

Description

Introduces 2 env variables to overcome some psutil issue.

  • PYTEST_MONITOR_FORCE_CPU_FREQ forces pytest-monitor to not compute the cpu frequency and use a default value instead
  • PYTEST_MONITOR_CPU_FREQ instructs pytest-monitor to consider using this value as a fallback value if it cannot compute the cpu frequency.

Fixes #60

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (not just the CI)
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the changelog
  • I have labeled my PR using appropriate tags (in particular using status labels like Status: Code Review Needed, Business: Test Needed or Status: In Progress if you are still working on the PR)

@js-dieu js-dieu added bug Something isn't working documentation Improvements or additions to documentation labels Oct 16, 2022
@js-dieu js-dieu self-assigned this Oct 16, 2022
Allow to set the CPU frequency from an environment variable.
Additionally, whenever psutil cannot resolve the cpu frequency, we use the same
fallback mechanism.
Added environment variables:
 - PYTEST_MONITOR_FORCE_CPU_FREQ (to overcome psutil)
 - PYTEST_MONITOR_CPU_FREQ (to set a CPU frequency value)
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@js-dieu js-dieu merged commit 32d0235 into CFMTech:master Oct 22, 2022
@js-dieu js-dieu deleted the fix/60 branch October 22, 2022 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NotImplementedError: can't find current frequency file
1 participant