Skip to content

Conversation

@zwoop
Copy link
Contributor

@zwoop zwoop commented Jul 10, 2023

The new API metrics are backwards compatible with previous APIs, since the old API wraps these new APIs. New plugins / code could chose to use the Metrics.h API directly.

Work to be finished here includes

  1. Decide what goes into include/api ? Do we have one new include file to #include all the include/api/*.h files?

  2. What should be moved to src/api and include/api.

Lost in this merge is all the work from Chris McFarlen. Thanks!

Co-Author: Chris McFarlen chris@mcfarlen.us

@zwoop zwoop added this to the 10.0.0 milestone Jul 10, 2023
@zwoop zwoop self-assigned this Jul 10, 2023
@zwoop zwoop changed the title New API Metrics, and start of a libtapi.so structure New API Metrics, and start of a libtsapi.so structure Jul 10, 2023
@zwoop zwoop force-pushed the NewAPIMetrics branch 5 times, most recently from c0c4323 to e1b3f6c Compare July 11, 2023 19:55
@zwoop
Copy link
Contributor Author

zwoop commented Jul 11, 2023

[approve ci autest]

@zwoop zwoop force-pushed the NewAPIMetrics branch 2 times, most recently from 8ea1fc6 to b39c6af Compare July 12, 2023 01:03
@zwoop
Copy link
Contributor Author

zwoop commented Jul 12, 2023

I did some quick tests using the remap_stats.so plugin (a global plugin), there's no noticeable difference in performance even though I'm just putting pressure on 3 single metrics (each updated on every request).

New Metrics:

100 mean bytes/fetch
1167275.00 fetches/sec, 1.16728e+08 bytes/sec
msecs/connect: 0.084 mean, 0.366 max, 0.027 min
msecs/first-response: 0.476 mean, 50.357 max, 0.024 min

Old Metrics:

100 mean bytes/fetch
1145004.00 fetches/sec, 1.14500e+08 bytes/sec
msecs/connect: 0.083 mean, 0.373 max, 0.025 min
msecs/first-response: 0.482 mean, 46.571 max, 0.023 min

The three metrics this plugin seems to create (these are all cache hits):

root@frigg /opt/ats-10 # ./bin/traffic_ctl metric match plugin
plugin.remap_stats.frigg-101.ogre.com.in_bytes 3132116893
plugin.remap_stats.frigg-101.ogre.com.out_bytes 11095556535
plugin.remap_stats.frigg-101.ogre.com.status_2xx 35223989

@zwoop zwoop force-pushed the NewAPIMetrics branch 10 times, most recently from 4e8a39d to f4eb828 Compare July 18, 2023 18:42
@apache apache deleted a comment from ezelkow1 Jul 18, 2023
@zwoop
Copy link
Contributor Author

zwoop commented Jul 19, 2023

@bneradt can you review again please ?

bneradt
bneradt previously approved these changes Jul 19, 2023
@bryancall
Copy link
Contributor

[approve ci clang-analyzer]

bneradt
bneradt previously approved these changes Jul 22, 2023
zwoop added 13 commits July 28, 2023 13:33
The new API metrics are backwards compatible with previous APIs,
since the old API wraps these new APIs. New plugins / code could
chose to use the Metrics.h API directly.

Work to be finished here includes

   1. Decide what goes into include/api ? Do we have one new
      include file to #include all the include/api/*.h files?

   2. What should be moved to src/api and include/api.

Lost in this merge is all the work from Chris McFarlen. Thanks!

Co-Author: Chris McFarlen <chris@mcfarlen.us>
@apache apache deleted a comment from zwoop Jul 28, 2023
@zwoop zwoop merged commit e6182d9 into apache:master Jul 28, 2023
@zwoop zwoop deleted the NewAPIMetrics branch July 28, 2023 22:48
@maskit maskit mentioned this pull request Aug 16, 2024
91 tasks
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.

3 participants