Marten Seemann
7f98a8b7ca
utils: use synctest to make the timer tests fully deterministic ( #5306 )
...
* utils: use synctest to make the timer tests fully deterministic
* Go 1.24 workaround
2025-08-25 09:25:50 +02:00
Marten Seemann
8c062ae604
use testing.B.Loop in all benchmark tests ( #5285 )
...
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -category=bloop -fix -test ./...
was used as a starting point.
2025-08-16 12:44:56 +02:00
Marten Seemann
66e5c5ebaa
replace interface{} with any ( #5290 )
...
No functional change expected.
2025-08-16 07:21:18 +02:00
Marten Seemann
da27fcf33f
expose basic connection stats via Conn.ConnectionStats ( #5281 )
...
* Add ConnectionStats
* remove for loop
* Add comments
* Update comments
---------
Co-authored-by: Marco Munizaga <git@marcopolo.io >
2025-08-13 16:45:14 +02:00
Marten Seemann
d33d293fd2
ci: enable the usetesting linter ( #5222 )
...
This linter is useful to detect the creation of temporary directories
and the setting of environment variables in tests.
2025-06-11 09:39:07 +02:00
Ameame
8ef0a71581
store the RTT in the token, not in the session ticket ( #5065 )
...
* remove RTT from session ticket
* save RTT in token
* use mus as rtt unit in token
* move RTT from session state to token on client side
* Rename the rtt variables
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
* Update internal/handshake/token_generator.go
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
* Update token_generator.go
* Update connection.go
* Update token_generator.go
* correct slice access in fuzz.go
* rearrange connection constructor parameters
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2025-05-16 12:25:58 +02:00
Marten Seemann
1d8f3f281a
ci: update golangci-lint to v2 ( #5007 )
2025-03-30 07:16:14 +02:00
Marten Seemann
9765f54dd2
utils: add a method to reset RTTStats for connection migration ( #4930 )
2025-01-26 09:37:31 +01:00
Marten Seemann
5dbb46dcc1
utils: remove unused now parameter from RTTStats.UpdateRTT ( #4780 )
2024-12-22 14:50:31 +08:00
Marten Seemann
3258060b48
utils: migrate tests away from Ginkgo ( #4675 )
2024-09-13 23:36:08 -07:00
Marten Seemann
7a10ed602d
utils: remove unused methods and constructor from RTTStats ( #4672 )
2024-09-12 00:55:57 -07:00
Marten Seemann
06cfeb1034
ringbuffer: migrate test away from Ginkgo ( #4671 )
2024-09-12 00:26:02 -07:00
Marten Seemann
8451b0afd7
utils: remove scarcely used time helper functions ( #4593 )
2024-07-23 14:16:12 -07:00
Marten Seemann
e179048526
wire: simplify packet number parsing, remove utils.ByteOrder interface ( #4590 )
2024-07-21 14:50:21 -07:00
Marten Seemann
29550811b4
remove trivial IPv4 helper function ( #4591 )
2024-07-21 14:50:03 -07:00
Marten Seemann
69ba7acb9f
ackhandler: don't delay ACKs for Initial and Handshake packets ( #4288 )
...
* ackhandler: don't delay ACKs for Initial and Handshake packets
* ackhandler: embed the receivedPacketHistory
2024-01-31 19:13:53 -08:00
Marten Seemann
22b7f7744e
use a ring buffer for the datagram queue ( #4223 )
2023-12-31 20:50:26 -08:00
Marten Seemann
22411e16d5
utils: switch to standard library min and max functions ( #4218 )
...
These functions were added in Go 1.21.
2023-12-27 21:19:13 -08:00
Marten Seemann
18c591c75a
utils: use time.Duration.Abs ( #4217 )
...
This function was added in Go 1.19, and covers some corner cases that
our custom implementation didn't.
2023-12-27 20:49:47 -08:00
Glonee
f1f42d8d90
use a ring buffer in the framer ( #3857 )
...
* implement and use ringbuffer in framer
* Add comments for ring buffer
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com >
2023-06-01 11:53:37 -07:00
Marten Seemann
02013caaa4
rttstats: don't set initial RTT after having obtained a measurement ( #3852 )
2023-05-28 15:09:25 +03:00
Marten Seemann
dee98638a4
use atomic.Bool from the standard library
2023-02-04 17:44:57 +13:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go ( #3680 )
2023-01-21 19:53:57 -08:00
Marten Seemann
d9665c632e
use a sync.Pool to reduce allocation of linked list elements
...
Especially the sentPacketHistory linked list shows up in allocation
profiles, since a new list element is allocated for every single packet
we send.
Using a pool for the receiving path, as well as for the frame sorter, is
less critical, since we're tracking ranges there instead of individual
packets / frames, but it doesn't hurt either.
The other occurrences where we use a linked list (connection ID tracking
and the token store) are used so rarely (a few times over the lifetime
of the connection) that using a pool doesn't make any sense there.
2022-12-30 19:24:56 +13:00
Marten Seemann
dd30a02627
ackhandler: remove the packet list element from the correct list
2022-12-30 18:35:26 +13:00
Marten Seemann
870fbe7ab0
migrate to Ginkgo v2
2022-10-11 16:38:44 +04:00
Marten Seemann
ee013d9d23
use a monotonous timer for the connection ( #3570 )
...
There's no point in having the timer fire multiple times for the same
timestamp. By using a monotonuos timer we avoid busy-looping in cases where the
timer fires, but we can't actually send a packet.
2022-10-11 05:36:10 -07:00
Marten Seemann
42cec84221
extend ByteOrder interface to allow converting from a byte slice
2022-08-29 13:11:58 +03:00
Marten Seemann
bea5de0221
Merge pull request #3483 from lucas-clemente/generic-min-max
...
use generic Min and Max functions
2022-08-12 12:09:30 +04:00
Marten Seemann
7ebe1430ef
use a generic linked list ( #3487 )
2022-08-10 09:50:21 -07:00
Marten Seemann
43bde14cf7
implement generic Min and Max functions
2022-08-10 14:59:05 +02:00
Marten Seemann
424325af58
rename utils.Min to utils.MinInt
2022-08-10 14:59:05 +02:00
Marten Seemann
2ea21b7b16
rename utils.Max to utils.MaxInt
2022-08-10 14:59:05 +02:00
Marten Seemann
08af9fc2c1
improve code coverage of random number generator test ( #3358 )
2022-03-25 09:37:37 +01:00
Marten Seemann
3c0726e132
move the random number generator to the utils package
2021-02-18 09:58:34 +08:00
Marten Seemann
11c5045065
move varint encoding / decoding to a separate package
...
... which is not internal.
2021-01-01 11:46:45 +08:00
Marten Seemann
653a107606
implement a function to encode a varint using a fixed length
2020-11-14 16:08:18 +07:00
Marten Seemann
8752576f26
run gofumpt, enable the gofumpt linter
2020-10-26 09:33:35 +07:00
Marten Seemann
876ab1d531
introduce a function to distinguish between IPv4 and IPv6 addresses
2020-09-14 17:01:34 +07:00
Marten Seemann
741dc28d74
move the RTTStats to the utils package
...
The RTTStats are used by the logging package. In order to instrument the
congestion package, the RTTStats can't be part of that package any more
(to avoid an import loop).
2020-07-23 11:53:08 +07:00
Marten Seemann
a1bb39d6ab
introduce a protocol.StatelessResetToken
2020-07-10 19:55:20 +07:00
Marten Seemann
0ef1b2f92e
pass around the stateless reset token directly, not pointers to it
...
Benchmarks show that it's actually faster to make a copy of this 16 byte
array than passing around a pointer to it.
2020-07-10 19:44:57 +07:00
Marten Seemann
1db3f06e87
stop the timer when the session's run loop returns
2020-05-02 07:53:47 +07:00
Marten Seemann
3e8c3cafc1
make the buffered qlog writer used in interop flush before closing
2020-03-19 12:58:56 +07:00
Marten Seemann
27549c5665
use the minimum of the two peers' max_idle_timeouts
2019-12-11 14:04:33 +04:00
Marten Seemann
031c1709e6
implement a basic store for new connection IDs
2019-11-05 10:59:21 +07:00
Marten Seemann
c41b68033c
Merge pull request #2080 from lucas-clemente/inline-varintlen
...
make sure that VarIntLen can be inlined
2019-08-23 22:59:51 +07:00
Marten Seemann
ccb197939d
replace WriteUintN and ReadUintN by explicit functions
2019-08-20 15:59:39 +07:00
Marten Seemann
f88546208d
make sure that VarIntLen can be inlined
2019-08-20 14:18:50 +07:00
Marten Seemann
2f09e1774c
remove unused utils.HostnameFromAddr function
2019-06-28 22:49:00 +07:00