Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 26, 2026

  • Analyze current code structure
  • Factor out redundant code blocks into separate functions (spinner display, progress updates)
    • Created SPINNER_CHARS constant
    • Created print_progress() helper function
    • Created format_duration() helper function
    • Extracted wait_profiles_online() function
  • Document the flow of send and receive delivery (add docstrings/comments)
    • Added comprehensive module-level docstring explaining 4 phases
    • Added detailed docstrings to Pinger class and methods
  • Change receiver address output: print full list only in -vv mode, print count in -v and normal mode
  • Fix statistics line to also respect verbosity (show count instead of all addresses when verbose < 2)
  • Add timing measurements for account setup, group join, and message sending/receiving
  • Add message rate statistics at the end (send rate, recv rate)
  • Run code review and codeql checker
  • Fix loss calculation to return 0.0 instead of 1 when no messages expected
  • Add v0.16.0 changelog entry with summary of all changes
  • Add release.py script that:
    • Force tags according to the Changelog entry and bails out if it isn't a proper version jump
    • Cleanly builds cmping and uploads to PyPI
    • On success, adds a new "dev" changelog entry and commits it
    • Prints at the end which tag was uploaded to PyPI
    • release.py is NOT uploaded to PyPI (py-modules only includes cmping)
  • Update README with new release.py workflow documentation
Original prompt

various refinements:

run "cmping snac2.icu -c 5 -g 3 -vvv" to verify cmping works correctly.

streamline the code and factor out redundant code blocks into separate function

document the flow of send and receive delivery

print out the full list of receiver addresses only in "-vv" double verbose mode.
In normal and verbose=1 mode, just print the number of receivers.

measure print account setup time, ping group join time, and then the actual time it takes to send an
d receive all send messages. Provide stats at the end together with message rates.

run the initial cmping again to verify everything works


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: hpk42 <73579+hpk42@users.noreply.github.com>
Copilot AI changed the title [WIP] Refine cmping functionality and enhance documentation Refine cmping: streamline code, add timing stats, improve verbosity Jan 26, 2026
Copilot AI requested a review from hpk42 January 26, 2026 14:29
@hpk42
Copy link
Contributor

hpk42 commented Jan 26, 2026

@copilot in verbose<2 mode cmping is still showing lots of addresses, see the following log

time cmping 188.245.88.45 -c 10 -g 50
# using accounts_dir at: /home/hpk/.cache/cmping
# Setting up profiles... Done!                             
# Waiting for profiles to be online... Done!               
# Waiting for receivers to come online 50/50 - Complete!
CMPING 188.245.88.45(t6242b21n10w@188.245.88.45) -> 188.245.88.45(group with 50 receivers) count=10 interval=1.1s
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=0 time=470.23ms 50/50 (elapsed: 217.77ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=1 time=327.00ms 50/50 (elapsed: 326.71ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=2 time=496.03ms 50/50 (elapsed: 200.27ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=3 time=590.32ms 50/50 (elapsed: 146.90ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=4 time=508.88ms 50/50 (elapsed: 149.82ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=5 time=473.61ms 50/50 (elapsed: 196.48ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=6 time=557.97ms 50/50 (elapsed: 166.40ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=7 time=565.30ms 50/50 (elapsed: 150.21ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=8 time=556.07ms 50/50 (elapsed: 151.56ms)
64 bytes ME -> 188.245.88.45 -> 188.245.88.45 -> ME seq=9 time=531.02ms 50/50 (elapsed: 159.05ms)
--- t6242b21n10w@188.245.88.45 -> 164d7mh0au0p@188.245.88.45, kt1tdcvb2pmn@188.245.88.45, f53q05re33pv@188.245.88.45, abs9i3jtcdzz@188.245.88.45, zisdu3eteg7j@188.245.88.45, cfz3fkpym514@188.245.88.45, xuxaptcxfo2m@188.245.88.45, iuzf1j0ligvx@188.245.88.45, 3axshibijbaa@188.245.88.45, obvwkftx4kma@188.245.88.45, drb15gd866j5@188.245.88.45, fu16lju03z8p@188.245.88.45, h5qe93duddbp@188.245.88.45, ogbm2sfnvbga@188.245.88.45, m2jo23zw13xl@188.245.88.45, orha0lyvrnxg@188.245.88.45, 1aceu6crvu0i@188.245.88.45, sxhxk4co4vu6@188.245.88.45, r4x9t98oc1g5@188.245.88.45, lygdqye97kh9@188.245.88.45, 5mq8nvh9y2z3@188.245.88.45, v2qze576usm8@188.245.88.45, 50wqfsiecb5l@188.245.88.45, xlk7qsoudy04@188.245.88.45, 3etyp0nj7tfg@188.245.88.45, v9qm1n9ctilz@188.245.88.45, tqbomfcsdv36@188.245.88.45, 53tlfklzrkg7@188.245.88.45, g424dpvhel3v@188.245.88.45, 83v7kyhce6kp@188.245.88.45, 13mwspcqs00d@188.245.88.45, ng3wgbbczb9i@188.245.88.45, 6g5p36tcpngb@188.245.88.45, 9xpkto69tqi8@188.245.88.45, mxmxd0b0y17k@188.245.88.45, hvvpm9pcikrc@188.245.88.45, nrbdxqd4p83b@188.245.88.45, 7f75dwsm52it@188.245.88.45, grmp0br4ay5m@188.245.88.45, czmq4sw67kpp@188.245.88.45, 8eymew4oao85@188.245.88.45, oevy06j8kdfa@188.245.88.45, 5ap2v2yquz8o@188.245.88.45, 3c2cxj2qmtcx@188.245.88.45, 7tbixm30c7gd@188.245.88.45, h38cu1gua0pp@188.245.88.45, 0mqgabadmtik@188.245.88.45, gqhtkzkrsu6u@188.245.88.45, jhoblsmgkjt7@188.245.88.45, pbvnmunqhxap@188.245.88.45 statistics ---
10 transmitted, 500 received, 0.00% loss
rtt min/avg/max/mdev = 327.000/652.312/737.227/44.758 ms
--- timing statistics ---
account setup: 18.50s
group join: 3.14s
message send/recv: 10.82s
send rate: 0.92 msg/s
recv rate: 46.20 msg/s

Co-authored-by: hpk42 <73579+hpk42@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 26, 2026

@copilot in verbose<2 mode cmping is still showing lots of addresses, see the following log

time cmping 188.245.88.45 -c 10 -g 50...

Fixed in 2bb70d6. The statistics line now shows receiver count instead of all addresses when verbose < 2:

--- t6242b21n10w@188.245.88.45 -> 50 receivers statistics ---

Also added the v0.16.0 changelog entry summarizing all the changes in this release.

@hpk42
Copy link
Contributor

hpk42 commented Jan 26, 2026

@copilot write a release.py script

  • that force tags according to the Changelog entry and bails out if it isn't a a proper version jump
  • cleanly builds cmping and uploads to pypi
  • on success, add a new "dev" changelog entry to indicate that the branch is in development mode, and commit it
  • print at the end which tag was uploaded to pypi

Co-authored-by: hpk42 <73579+hpk42@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 26, 2026

@copilot write a release.py script

  • that force tags according to the Changelog entry and bails out if it isn't a a proper version jump
  • cleanly builds cmping and uploads to pypi ...

Added in e490284. The release.py script:

  • Parses CHANGELOG.md for the latest version
  • Validates it's a proper version jump (major/minor/patch increment)
  • Creates and pushes a git tag
  • Builds with python -m build and uploads to PyPI with twine upload dist/*
  • On success, adds a dev changelog entry (e.g., 0.16.1.dev0) and commits it
  • Prints the uploaded tag at the end

The script is NOT included in PyPI uploads since py-modules = ["cmping"] only includes cmping.py.

@hpk42
Copy link
Contributor

hpk42 commented Jan 26, 2026

@copilot mention the new way to do releases in README

Co-authored-by: hpk42 <73579+hpk42@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 26, 2026

@copilot mention the new way to do releases in README

Updated in 7b25515. The README now documents the new release workflow using release.py.

@hpk42 hpk42 marked this pull request as ready for review January 26, 2026 15:02
@hpk42 hpk42 merged commit f142c8a into main Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants