How to get Group Names from DataReader

Browsing around the source code and trying to dump all stats into a single json file. not like currently reports inject all data into htmls and javaScripts.

i found i can get request names from
def requestNames: List[String]

but i dont see a field i can get groupNames. But in all other methods, group is passed in as a parameter. Any ideas how i can get the groupName return back? Probably my scala is not good enough to understand every detail statement.


I think, best for you is to look at this code sample :

Does it help ?


i somehow understand what it does. unfortunately I’m using java and invoke gatling and scala as my library. i use this to get a collection of StatsPath back but dont really know what to proceed:

Collection statsPath = JavaConversions.asJavaCollection(dataReader.statsPaths());
List statsPathList = new ArrayList(statsPath);

from this file:, i “feel” RequestStatsPath and GroupsStatsPath are subclasses of StatsPath. My understanding could be wrong…From the collection i get know, how can i get a list of reqeust names and group names?

i figured this out by using instaceof to do the match/case work.

for(int i=0;i<statsPathList.size();i++) {
StatsPath statsPath = statsPathList.get(i);
if(statsPath instanceof GroupStatsPath) {
GroupStatsPath groupStatsPath = (GroupStatsPath) statsPath;

That’s it.

Thanks for keep us posted.