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

79 collect optimization metrics #121

Merged
merged 3 commits into from
Feb 14, 2024
Merged

Conversation

deemp
Copy link
Member

@deemp deemp commented Feb 14, 2024

Closes #79

  • How to count dataless attributes?

PR-Codex overview

Focus of this PR:

This PR focuses on adding metrics collection functionality to the eo-phi-normalizer package.

Detailed summary:

  • Added MetricsTestSet and MetricsTest data types to represent metrics tests.
  • Added Metrics data type to represent various metrics.
  • Added collectMetrics function to collect metrics from a given program.
  • Added Inspectable type class and instances for Program, Binding, Attribute, and Object to enable metrics collection.
  • Updated Test.Metrics.Phi module to include tests for metrics collection.
  • Modified eo-phi-normalizer.cabal to include generic-lens and lens as dependencies.
  • Modified eo-phi-normalizer-test to include Test.Metrics.Phi as a test module.
  • Added Metrics module to eo-phi-normalizer package.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@deemp deemp linked an issue Feb 14, 2024 that may be closed by this pull request
4 tasks
@deemp deemp force-pushed the 79-collect-optimization-metrics branch from a7e2920 to 1fa2d31 Compare February 14, 2024 10:05
@deemp deemp requested a review from fizruk February 14, 2024 10:10
@fizruk fizruk merged commit 81036bf into master Feb 14, 2024
5 checks passed
Comment on lines +57 to +64
inspect = \case
Phi -> pure ()
Rho -> pure ()
Sigma -> pure ()
VTX -> pure ()
Label _ -> pure ()
Alpha _ -> pure ()
MetaAttr _ -> pure ()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't this have simply been

Suggested change
inspect = \case
Phi -> pure ()
Rho -> pure ()
Sigma -> pure ()
VTX -> pure ()
Label _ -> pure ()
Alpha _ -> pure ()
MetaAttr _ -> pure ()
inspect = const $ pure ()

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could, but I wasn't sure it should have been.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't know what's a dataless attribute.

@aabounegm aabounegm deleted the 79-collect-optimization-metrics branch March 4, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collect optimization metrics
3 participants