whiteblock / gossipsub-testing

Gossipsub tests
MIT License
17 stars 4 forks source link

Add the ability to generate random messages of a given size #3

Open atoulme opened 5 years ago

atoulme commented 5 years ago

Allow to create random messages of a given size, with the size being given as a parameter to the function.

adam-hanna commented 5 years ago

Agreed.

There's a bytes array that will be used to hold this variable sized data in the message protobuf: https://github.com/agencyenterprise/gossip-host/blob/6c5adf566b389edd47656e75a229e354c06e1e57/internal/host/pb/message.proto#L7

araskachoi commented 5 years ago

@adam-hanna Hey adam, so does this create a message with indicated size (in bytes)? I'm not sure how important it is but should we make the whole message be the indicated size or should we have the message data field be the indicated size? might not matter so much right now

adam-hanna commented 5 years ago

@araskachoi

Right now, it just reads from a json file. So the json file would need to have a bytes array of the desired size.

I could really easily add flag that replaces the bytes array in the json file with one of a desired size.

I think the entire message size should be the metric we target.

araskachoi commented 5 years ago

Yes I agree, the entire size of the message should be the size that we indicated.

Awesome, this will be needed when we will run the msg_size test; where we vary the message size in bytes