> On July 2, 2015, 12:29 a.m., Ian Downes wrote:
> > src/tests/perf_tests.cpp, line 87
> > <https://reviews.apache.org/r/36115/diff/1/?file=997707#file997707line87>
> >
> >     ```cpp
> >     foreach (const tuple<Version, string>& input, input1) {}
> >     ```?

foreach doesn't work with tuple for me. I used the for (auto it : input) 
suggested by pbrett.


> On July 2, 2015, 12:29 a.m., Ian Downes wrote:
> > src/tests/perf_tests.cpp, lines 76-84
> > <https://reviews.apache.org/r/36115/diff/1/?file=997707#file997707line76>
> >
> >     You're testing each version of parse here explicitly rather than 
> > testing that parse() does the right thing for different versions of input. 
> > I would construct different inputs corresponding to different perf versions 
> > and then verify that the *output* had the correct fields and values.

I am not completely clear about your thoughts. could you give an example maybe?

Also if I give v2 exact a v1 input "1,cycle,cgroup", it'd have no problem 
parsing it as value of 1, unit of cycle and event of cgroup.

parse can't detect the version out of the input, it uses the version info 
either given or from uname to delegate to the right extract, that's why I used 
a lot of verions to test the extract choose logic. 

If I get your idea correctly, it's just a differernt way to organize the loops?

I am looping over all the versions for input of the same nature; you want to 
test one version at a time but loop over all the inputs (of different natures)?


- Chi


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36115/#review90177
-----------------------------------------------------------


On July 2, 2015, 11:42 p.m., Chi Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36115/
> -----------------------------------------------------------
> 
> (Updated July 2, 2015, 11:42 p.m.)
> 
> 
> Review request for mesos, Ian Downes, Paul Brett, and Cong Wang.
> 
> 
> Bugs: mesos-2834
>     https://issues.apache.org/jira/browse/mesos-2834
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> perf: changed 'parse' interface to allow testing and added tests.
> 
> 
> Diffs
> -----
> 
>   src/linux/perf.hpp b77b61d7048b12cea4586bcf802cbc2ff634331b 
>   src/linux/perf.cpp 697b75e846a43d4f106ad8f39a18882836d7dc02 
>   src/tests/perf_tests.cpp 281eed0094faead67dc7f84df6407686aae88b01 
> 
> Diff: https://reviews.apache.org/r/36115/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Chi Zhang
> 
>

Reply via email to