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

[INLONG-11680][SDK] Optimize metric-related implementation #11708

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

gosonzhang
Copy link
Contributor

Fixes #11680

  1. Define new indicator models: metadata synchronization indicator MetaSyncInfo, time consumption statistics indicator TimeWastInfo, traffic statistics indicator TrafficInfo
  2. Add indicator data aggregation and output class MetricDataHolder to manage indicator statistics and output;
  3. Add statistics management for HTTP and TCP data reporting, as well as metadata update operations

long curCnt = totalCnt.sumThenReset();
if (curCnt == 0) {
strBuff.append("\"").append(name)
.append("\":{\"bucketT\":{},\"min\":0,\"max\":0,\"avgT\":0,\"cnt\":0}");
Copy link
Contributor

Choose a reason for hiding this comment

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

Please replace with a constant. like public static final String MIN = "min";public static final String BUCKETT = "bucketT";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main purpose here is to improve performance and output directly as a string constant

@aloyszhang aloyszhang merged commit 3b4634e into apache:master Jan 22, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improve][SDK] Optimize metric-related implementation
4 participants