From de7a7bf994a020049eca89098aab9d13ff81f361 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Sat, 4 Jun 2022 05:49:07 -0400 Subject: [Feature] Access TCP_INFO about underlying TCP connections This will only work on *nix systems. Code that displays information in this PR is only exemplary -- I am sure that there are better places in the code to display it! --- lgc/lgc.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lgc') diff --git a/lgc/lgc.go b/lgc/lgc.go index 13f2c06..5b35fd1 100644 --- a/lgc/lgc.go +++ b/lgc/lgc.go @@ -38,6 +38,7 @@ type LoadGeneratingConnection interface { Client() *http.Client IsValid() bool ClientId() uint64 + Stats() *stats.TraceStats } // TODO: All 64-bit fields that are accessed atomically must @@ -284,6 +285,10 @@ func (lbd *LoadGeneratingConnectionDownload) IsValid() bool { return lbd.valid } +func (lbd *LoadGeneratingConnectionDownload) Stats() *stats.TraceStats { + return &lbd.stats +} + func (lbd *LoadGeneratingConnectionDownload) doDownload(ctx context.Context) { var request *http.Request = nil var get *http.Response = nil @@ -420,3 +425,7 @@ func (lgu *LoadGeneratingConnectionUpload) Start( go lgu.doUpload(ctx) return true } + +func (lbd *LoadGeneratingConnectionUpload) Stats() *stats.TraceStats { + return nil +} -- cgit v1.2.3