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

Using constant value of "expected" metric count instead of an expression #264

Closed
MoromugHSE opened this issue Apr 1, 2024 · 9 comments
Closed
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@MoromugHSE
Copy link
Contributor

The test "test-measure-file.sh" has an integer literal as a total number of metrics (line 48). Would be probably better to change it to be evaluated on test run.

@yegor256 yegor256 added bug Something isn't working help wanted Extra attention is needed labels Apr 2, 2024
@yegor256 yegor256 added the good first issue Good for newcomers label May 2, 2024
@timur-harin
Copy link
Contributor

@yegor256
I will be glad to help

Can you please, as the author of the repository, tell me where the original source is, how many metrics are in the repository?
Because in README.md I see only 48 metrics, but in script test-measure-file.sh number is 52

@timur-harin
Copy link
Contributor

@yegor256
Could you please help me?

@timur-harin
Copy link
Contributor

@yegor256
Please answer the question above

@yegor256
Copy link
Owner

@timur-harin this is not an easy ticket. We don't know how to do this right. Somehow, the script should know what is the "right" number of metrics to be calculated by all scripts in the metrics/ directory. Now, we simply hardcoded this number, which is not convenient. But how to calculate it in runtime - I'm not sure yet. Maybe you can suggest something?

@timur-harin
Copy link
Contributor

timur-harin commented May 22, 2024

@yegor256
How about this:

  • In ast.py, we can measure metric.write or in others py files m.write
  • In bash scripts, find the number of unique names of metrics with capital letter after cat or echo or puts?

@yegor256
Copy link
Owner

@timur-harin let's do the following instead. We add a new test into the test-measure-file.sh. It will first run measure-file.sh with a very simple java file class Foo {} and see how many metrics were created. Then, it will run the same script, but with a very complicated file, and also check how many metrics were collected. If the numbers match, we are good.

@timur-harin
Copy link
Contributor

@yegor256
Please check PR #341

@timur-harin
Copy link
Contributor

@yegor256
I think we need to close this issue, because PR merged success

@yegor256
Copy link
Owner

@MoromugHSE the issue was resolved, I'm closing this ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants