Search in sources :

Example 6 with EntityMap

use of com.tvd12.calabash.core.EntityMap in project calabash by youngmonkeys.

the class SimpleEntityMapManager method addStatistics.

@Override
public void addStatistics(Map<String, Object> statistics) {
    synchronized (maps) {
        statistics.put("numberOfMaps", maps.size());
        List<Map<String, Object>> mapStats = new ArrayList<>();
        for (String mapName : maps.keySet()) {
            EntityMap map = maps.get(mapName);
            Map<String, Object> mapStat = new HashMap<>();
            mapStat.put("name", mapName);
            ((StatisticsAware) map).addStatistics(mapStat);
            mapStats.add(mapStat);
        }
        statistics.put("maps", mapStats);
    }
}
Also used : EntityMap(com.tvd12.calabash.core.EntityMap) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) StatisticsAware(com.tvd12.calabash.core.statistic.StatisticsAware) Map(java.util.Map) EntityMap(com.tvd12.calabash.core.EntityMap) HashMap(java.util.HashMap)

Aggregations

EntityMap (com.tvd12.calabash.core.EntityMap)3 StatisticsAware (com.tvd12.calabash.core.statistic.StatisticsAware)3 HashMap (java.util.HashMap)3 Calabash (com.tvd12.calabash.Calabash)2 IAtomicLong (com.tvd12.calabash.core.IAtomicLong)2 CalabashBuilder (com.tvd12.calabash.local.CalabashBuilder)2 SimpleEntityMapPersistSetting (com.tvd12.calabash.local.setting.SimpleEntityMapPersistSetting)2 SimpleEntityMapSetting (com.tvd12.calabash.local.setting.SimpleEntityMapSetting)2 SimpleSettings (com.tvd12.calabash.local.setting.SimpleSettings)2 SimpleEntityMapPersistFactory (com.tvd12.calabash.persist.factory.SimpleEntityMapPersistFactory)2 EzyBeanContext (com.tvd12.ezyfox.bean.EzyBeanContext)2 List (java.util.List)2 CalabaseClient (com.tvd12.calabash.client.CalabaseClient)1 Animal (com.tvd12.calabash.local.test.mappersist.Animal)1 Person (com.tvd12.calabash.local.test.mappersist.Person)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1