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

Format mgr:sbuf report as YAML #1795

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

kinkie
Copy link
Contributor

@kinkie kinkie commented Apr 25, 2024

No description provided.

@kinkie
Copy link
Contributor Author

kinkie commented Apr 25, 2024

Only formatting changes were performed. A couple of keys were simplified/clarified.
Sample output from master:




These statistics are experimental; their format and contents should not be relied upon, they are bound to change as the SBuf feature is evolved
SBuf stats:
number of allocations: 6412
copy-allocations: 1347
copy-allocations from C String: 673
live references: 2027
no-copy assignments: 1201
clearing operations: 3027
append operations: 3125
move operations: 292
dump-to-ostream: 9
set-char: 1245
get-char: 393
comparisons with data-scan: 371
comparisons not requiring data-scan: 8
copy-out ops: 42
raw access to memory: 6324
NULL terminate C string: 1172
chop operations: 625
trim operations: 0
find: 60
case-change ops: 68
COW completely avoided: 689
COW replaced with memmove(3): 0
COW requiring an empty buffer allocation: 1888
COW requiring allocation and copying: 99
average store share factor: 1.55684
MemBlob created: 1988
MemBlob alive: 1295
MemBlob append calls: 2886
MemBlob currently allocated size: 62112
live MemBlob mean current allocation size: 47.9629

SBuf size distribution at destruct time:
	30-30	70
	31-32	1
	33-33	1
	37-38	2
	38-39	1
	43-45	5
	59-63	3
	97-106	1
MemBlob capacity distribution at destruct time:
	31-32	5
	63-67	1

sample output with PR applied:

SBuf stats:
  allocations: 9886
  copy-allocations: 4507
  copy-allocations from cstring: 729
  live references: 2058
  no-copy assignments: 1248
  clearing operations: 3194
  append operations: 5361
  move operations: 853
  dump-to-ostream: 108
  set-char: 1247
  get-char: 2637
  comparisons with data-scan: 642
  comparisons not requiring data-scan: 8
  copy-out ops: 9
  raw access to memory: 8549
  NULL terminate cstring: 1174
  chop operations: 5047
  trim operations: 0
  find: 1281
  case-change ops: 68
  COW completely avoided: 723
  COW replaced with memmove: 0
  COW requiring an empty buffer allocation: 2064
  COW requiring allocation and copying: 170
  average store share factor: 1.549
MemBlob stats:
  allocations: 2235
  live instances: 1322
  append calls: 4071
  cumulative size bytes: 63296
  mean size: 47.9
SBuf size distribution at destruct time:
  30-30: 70
  31-32: 1
  33-33: 1
  37-38: 2
  38-39: 1
  43-45: 5
  59-63: 3
  97-106: 1
MemBlob capacity distribution at destruct time:
  31-32: 5
  63-67: 1

@kinkie
Copy link
Contributor Author

kinkie commented Apr 25, 2024

StatHist has a definitely dated API, but this is not the PR to change that.
My goal for this sprint is to get to convert all cachemgr reports to yaml

Copy link
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

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

Please wait for spaces() issue to be resolved before posting more YAML PRs or requesting additional reviews.

(ststats.live != 0 ? static_cast<float>(live)/ststats.live : 0) <<
std::endl;
return os;
const std::string indent(" ");
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not use std::string in primary Squid code. In most cases (probably including this one), using SBuf is best. I am aware that this code reports SBuf stats.

@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Apr 30, 2024
@kinkie kinkie added S-waiting-for-PR Closure of other PR(s), current or future, is expected (and usually required) M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels S-waiting-for-PR Closure of other PR(s), current or future, is expected (and usually required)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants