Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

feat: add bytes transferred per event #71

Merged
merged 2 commits into from
Sep 19, 2023
Merged

feat: add bytes transferred per event #71

merged 2 commits into from
Sep 19, 2023

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Sep 18, 2023

Ref: filecoin-project/lassie#345

Needs this done on the current DB to bring it up to the schema in here:

ALTER TABLE retrieval_attempts ADD COLUMN bytes_transferred bigint;

As is, with filecoin-project/lassie#345 deployed, this would add an attempt per peer that's involved in a bitswap retrieval, it'll also tag those that are Filecoin SPs in the prometheus metrics. I don't think we currently have insight into how many peers are involved in a retrieval, on average, so I'm not sure how much extra chatter this is going to add to the database.

It won't do anything with the number of bytes transferred per provider other than slot that into the database. We may need to reflect further on the dashboard regarding how/if we want to include that somehow (e.g. some kind of ranking per bytes transferred? maybe a Filecoin SP was involved in a bitswap retrieval but contributed a single block to a 100 block retrieval, do we care?).

@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2023

Codecov Report

Merging #71 (eac313e) into main (97897ce) will increase coverage by 0.10%.
The diff coverage is 61.53%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   23.27%   23.38%   +0.10%     
==========================================
  Files          10       10              
  Lines        1276     1283       +7     
==========================================
+ Hits          297      300       +3     
- Misses        953      957       +4     
  Partials       26       26              
Files Changed Coverage Δ
eventrecorder/event.go 59.22% <ø> (ø)
metrics/events.go 0.00% <0.00%> (ø)
eventrecorder/recorder.go 46.99% <100.00%> (+0.56%) ⬆️

@rvagg
Copy link
Member Author

rvagg commented Sep 19, 2023

changes made on current db instance

@rvagg rvagg merged commit 270b3f6 into main Sep 19, 2023
11 checks passed
@rvagg rvagg deleted the rvagg/attempt-bytes branch September 19, 2023 09:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants