----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38117/#review110563 -----------------------------------------------------------
Looks good, I just want to pull that parsing code out so it can be tested. src/slave/containerizer/mesos/isolators/network/port_mapping.cpp (lines 1131 - 1173) <https://reviews.apache.org/r/38117/#comment170501> Can you please pull the parsing code out into a function and add some tests around it? One test could read the host's /proc/net/snmp and test parsing is sucessful, further tests should ensure known values are parsed correctly. - Ian Downes On Dec. 14, 2015, 4:05 p.m., Cong Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38117/ > ----------------------------------------------------------- > > (Updated Dec. 14, 2015, 4:05 p.m.) > > > Review request for mesos, Ian Downes, Jie Yu, and Vinod Kone. > > > Bugs: MESOS-3365 > https://issues.apache.org/jira/browse/MESOS-3365 > > > Repository: mesos > > > Description > ------- > > These stats are those we get by `netstat -s`, they are important for diagnose > networking issues. > > > Diffs > ----- > > docs/configuration.md c75f56ce849f6960b3b6246bfa6949156a82eabb > include/mesos/mesos.proto 8ca213062c480f0266ffc51a621eb4a118140c77 > src/slave/containerizer/mesos/isolators/network/port_mapping.hpp > cbb94077d46d7b87ffc09b72e02269bc16f25f92 > src/slave/containerizer/mesos/isolators/network/port_mapping.cpp > 49e215ba3502bba029956fedfc8bd828c3b4a028 > src/slave/flags.hpp 1250786d1bdc8b312a1912a37ac8aac373dd5ec9 > src/slave/flags.cpp c4343ab7ff7b7b4d2c335119d41319b0779d2806 > > Diff: https://reviews.apache.org/r/38117/diff/ > > > Testing > ------- > > ./src/mesos-network-helper statistics --eth0_name=X --enable_snmp_statistics > --pid=XXXX > > > Thanks, > > Cong Wang > >
