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

feat(metrics): rename method purgeStoredMetrics to publishStoredMetrics #377

Merged
merged 3 commits into from
Jan 3, 2022

Conversation

flochaz
Copy link
Contributor

@flochaz flochaz commented Jan 3, 2022

Description of your changes

purgeStoredMetrics is confusing, renaming to publishStoredMetrics.

How to verify this change

cd packages/metrics
npm ci
npm run test
npm run test:e2e

Related issues, RFCs

#301

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@saragerion saragerion left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -2,9 +2,9 @@
// SPDX-License-Identifier: MIT-0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A following PR will focus on refactoring e2e test to reuse tracing one

)
.promise();

// Despite lambda has been called twice, coldstart metric sum should only be 1
const singleDataPoint = coldStartMetricStat.Datapoints ? coldStartMetricStat.Datapoints[0] : {};
expect(singleDataPoint.Sum).toBe(1);
}, 9000000);
});
}, 15000);
Copy link
Contributor

Choose a reason for hiding this comment

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

(minor) timeout is in ms. Will 15 sec be sufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes the test itself is quite fast. but since we sleep for 10s to get metrics ingested it still takes around 11sec

Copy link
Contributor

@ijemmy ijemmy left a comment

Choose a reason for hiding this comment

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

One minor point to check. But this looks good enough to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics This item relates to the Metrics Utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants