summaryrefslogtreecommitdiff
path: root/lgc
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2022-06-04 05:49:07 -0400
committerWill Hawkins <[email protected]>2022-06-04 05:49:07 -0400
commitde7a7bf994a020049eca89098aab9d13ff81f361 (patch)
tree25137addcf1ee9cc0c68c05d33481bcd050046ac /lgc
parentd38bea818a90a0ca2bfc17e96c00b9896e2c61ca (diff)
[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!
Diffstat (limited to 'lgc')
-rw-r--r--lgc/lgc.go9
1 files changed, 9 insertions, 0 deletions
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
+}