Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Use SOH timestamp to calculate bandwidth in TM#7539

Merged
srijeet0406 merged 8 commits intoapache:masterfrom
rimashah25:bugfix/soh-timestamp
May 31, 2023
Merged

Use SOH timestamp to calculate bandwidth in TM#7539
srijeet0406 merged 8 commits intoapache:masterfrom
rimashah25:bugfix/soh-timestamp

Conversation

@rimashah25
Copy link
Copy Markdown
Contributor

@rimashah25 rimashah25 commented May 24, 2023

This PR is not related to any issue.


Which Traffic Control components are affected by this PR?

  • Traffic Monitor

What is the best way to verify this PR?

No easy way to test from local but you can test it from staging to see whether TM (calls /_stats endpoint from traffic server for given caches e.g: curl -Lv http:/<cache_end_point>/_stats and uses and stats _over_http to calculate bandwidth) generates the right amount (doesn't double the value) of bandwidth for bond0 and bond1

If this is a bugfix, which Traffic Control versions contained the bug?

7.0.1

PR submission checklist

@rimashah25 rimashah25 added Traffic Monitor related to Traffic Monitor regression bug a bug in existing functionality introduced by a new version labels May 24, 2023
@rimashah25 rimashah25 force-pushed the bugfix/soh-timestamp branch from 9e48e38 to 3420f40 Compare May 25, 2023 16:02
@rimashah25 rimashah25 marked this pull request as ready for review May 25, 2023 16:05
@rimashah25 rimashah25 requested a review from srijeet0406 May 25, 2023 16:05
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2023

Codecov Report

Merging #7539 (1061f9c) into master (6fb2524) will decrease coverage by 2.61%.
The diff coverage is 41.17%.

@@             Coverage Diff              @@
##             master    #7539      +/-   ##
============================================
- Coverage     30.34%   27.74%   -2.61%     
  Complexity       98       98              
============================================
  Files           790      686     -104     
  Lines         82622    78116    -4506     
  Branches        851       90     -761     
============================================
- Hits          25075    21675    -3400     
+ Misses        55435    54384    -1051     
+ Partials       2112     2057      -55     
Flag Coverage Δ
golib_unit 48.56% <ø> (-0.02%) ⬇️
grove_unit 4.60% <ø> (ø)
t3c_unit 5.32% <ø> (ø)
traffic_monitor_unit 21.35% <41.17%> (+0.07%) ⬆️
traffic_ops_unit 23.43% <ø> (-0.02%) ⬇️
traffic_portal_v2 ?
traffic_stats_unit 10.14% <ø> (ø)
unit_tests 24.40% <41.17%> (-3.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
traffic_monitor/cache/cache.go 42.77% <0.00%> (-2.75%) ⬇️
traffic_monitor/health/cache.go 59.93% <100.00%> (+0.65%) ⬆️

... and 108 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rimashah25 rimashah25 force-pushed the bugfix/soh-timestamp branch from 3420f40 to 112718b Compare May 25, 2023 21:18
Comment thread traffic_monitor/cache/cache.go Outdated
Comment thread traffic_monitor/cache/cache.go Outdated
Comment thread traffic_monitor/health/cache.go Outdated
Comment thread traffic_monitor/health/cache.go Outdated
Comment thread traffic_monitor/health/cache.go Outdated
Comment thread traffic_monitor/health/cache.go Outdated
@rimashah25 rimashah25 force-pushed the bugfix/soh-timestamp branch from 6893c13 to c0f91d5 Compare May 31, 2023 21:18
@rimashah25 rimashah25 force-pushed the bugfix/soh-timestamp branch from c0f91d5 to c97325b Compare May 31, 2023 21:50
@rimashah25 rimashah25 requested a review from srijeet0406 May 31, 2023 21:52
@srijeet0406 srijeet0406 merged commit f3c124f into apache:master May 31, 2023
@rimashah25 rimashah25 deleted the bugfix/soh-timestamp branch May 31, 2023 23:12
jagan-parthiban pushed a commit to jagan-parthiban/trafficcontrol that referenced this pull request Jun 2, 2023
* Added current_time_epoch_ms and changes calculation for timestamp for ms

* assigning current_time_epoch_ms to result.Time in Handler

* updated CHANGELOG.md

* Added check for elapsedTime.

* Addressed review comments.

* Added prevResult check back

* pointer assignment for structure.

* updated cache unite test with another check.
jagan-parthiban pushed a commit to jagan-parthiban/trafficcontrol that referenced this pull request Jun 5, 2023
* Added current_time_epoch_ms and changes calculation for timestamp for ms

* assigning current_time_epoch_ms to result.Time in Handler

* updated CHANGELOG.md

* Added check for elapsedTime.

* Addressed review comments.

* Added prevResult check back

* pointer assignment for structure.

* updated cache unite test with another check.
jagan-parthiban pushed a commit to jagan-parthiban/trafficcontrol that referenced this pull request Jun 14, 2023
* Added current_time_epoch_ms and changes calculation for timestamp for ms

* assigning current_time_epoch_ms to result.Time in Handler

* updated CHANGELOG.md

* Added check for elapsedTime.

* Addressed review comments.

* Added prevResult check back

* pointer assignment for structure.

* updated cache unite test with another check.
jagan-parthiban pushed a commit to jagan-parthiban/trafficcontrol that referenced this pull request Jun 14, 2023
* Added current_time_epoch_ms and changes calculation for timestamp for ms

* assigning current_time_epoch_ms to result.Time in Handler

* updated CHANGELOG.md

* Added check for elapsedTime.

* Addressed review comments.

* Added prevResult check back

* pointer assignment for structure.

* updated cache unite test with another check.
jagan-parthiban pushed a commit to jagan-parthiban/trafficcontrol that referenced this pull request Jun 18, 2023
* Added current_time_epoch_ms and changes calculation for timestamp for ms

* assigning current_time_epoch_ms to result.Time in Handler

* updated CHANGELOG.md

* Added check for elapsedTime.

* Addressed review comments.

* Added prevResult check back

* pointer assignment for structure.

* updated cache unite test with another check.
rimashah25 added a commit that referenced this pull request Jun 29, 2023
zrhoffman pushed a commit that referenced this pull request Jun 29, 2023
* Revert "TM - Plugin Systems Stats Timestamp for SOH (#7551)"

This reverts commit a1bd413.

* Revert "Use SOH timestamp to calculate bandwidth in TM (#7539)"

This reverts commit f3c124f
rimashah25 added a commit to rimashah25/trafficcontrol that referenced this pull request Jun 29, 2023
jagan-parthiban pushed a commit to jagan-parthiban/trafficcontrol that referenced this pull request Jul 3, 2023
* Added current_time_epoch_ms and changes calculation for timestamp for ms

* assigning current_time_epoch_ms to result.Time in Handler

* updated CHANGELOG.md

* Added check for elapsedTime.

* Addressed review comments.

* Added prevResult check back

* pointer assignment for structure.

* updated cache unite test with another check.
srijeet0406 pushed a commit that referenced this pull request Jul 5, 2023
…7545)

* Fixes #7544 Updated V5 APIs

* Fixes #7544 Updated Integration testing based on RFC3339 Format

* Fixes #7544 Added Unit test Cases wherever possible.

* CHANGELOG.md Update

* Documentation Update

* Fixed PR review comments

* Use SOH timestamp to calculate bandwidth in TM (#7539)

* Added current_time_epoch_ms and changes calculation for timestamp for ms

* assigning current_time_epoch_ms to result.Time in Handler

* updated CHANGELOG.md

* Added check for elapsedTime.

* Addressed review comments.

* Added prevResult check back

* pointer assignment for structure.

* updated cache unite test with another check.

* Fixed PR review comments for #7544

* Fixed CHANGELOG.md for #7544

* Fixed CHANGELOG.md for #7544

* Fixed CHANGELOG.md for #7544

* Fixed PR review comments for #7544

* Fixed PR Review comments

* Fixed CHANGELOG.md

* Update stats_summary lib

* Updated statessummary file

* Updated unit test cases

* Temp changes to check GHA

* Temp changes to check GHA

* revert Temp changes to check GHA

* Updated CHANGELOG.md

* Updated GHA failing test case for testing.

* Updated GHA failing test case.

---------

Co-authored-by: Rima Shah <22248619+rimashah25@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

regression bug a bug in existing functionality introduced by a new version Traffic Monitor related to Traffic Monitor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants