[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0 of 6 V1] Counters


Hi Audreus,

Le 10/02/14 17:35, Audrius Butkevicius a écrit :
> Hi Aris,
> 
> On 10/02/2014 16:00, Aris Adamantiadis wrote:
>> - Doxygen comments:
>> You comments are great. Could you put them in the implementation of
>> functions (counters.c) as we do for the other includes in libssh.h ?
>> That would be a little more coherent.
> I assume you mean put comments in counters.c as well as in libssh.h?
I mean moving all doxygen comments for functions in counters.c. If there
are doxygen comments for the structures, they can stay in libssh.h.

>> On the code itself:
>> - I think you can merge ssh_bytes_counter_struct and
>> ssh_packet_counter_struct. It's very likely that both will be used at
>> same time and that reduces the overall complexity. ssh_counter_struct is
>> also shorter :) Also means less setters.
>> What do you think ?
> I can do this, but the issue with this is that in some cases there will
> be no bytes, or no packets.
That's not a big problem. we can always find data sources for these
counters.
> Furthermore, we can only reduce (for the session) by one argument,
> because you still need to have separate counters for bytes/packets on
> the socket, as well as bytes (but not packets) prior the protocol overhead.
> Meaning that I'd still have to store two ssh_counter structs in the
> session, and for the channel I'd be holding a struct which only uses
> bytes (but not packets).
Agreed but two pointers is better than 4. Let's keep it simple.

Aris
> 
> 
> Thanks,
> Audrius.
> 

References:
Re: [PATCH 0 of 6 V1] CountersAris Adamantiadis <aris@xxxxxxxxxxxx>
Re: [PATCH 0 of 6 V1] CountersAudrius Butkevicius <audrius.butkevicius@xxxxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org