use of org.opennms.features.topology.api.support.VertexHopGraphProvider.DefaultVertexHopCriteria in project opennms by OpenNMS.
the class VertexHopGraphProviderScaleTest method testGraphProvider.
@Test
public void testGraphProvider() {
VertexRef randomVertex = randomVertex();
DefaultVertexHopCriteria criteria = new DefaultVertexHopCriteria(randomVertex);
LOG.info("Focus Nodes: {}", criteria.getVertices());
long start = System.nanoTime();
List<Vertex> vertices2 = m_provider.getVertices(criteria);
long end = System.nanoTime();
double time = (end - start) / (1000000.0);
LOG.info("ElapsedTime = {} ms", time);
LOG.info("{}, {}, {}, {}", m_vertexCount, m_edgeCount, time, vertices2.size());
}
use of org.opennms.features.topology.api.support.VertexHopGraphProvider.DefaultVertexHopCriteria in project opennms by OpenNMS.
the class SimpleSearchProvider method addVertexHopCriteria.
@Override
public void addVertexHopCriteria(SearchResult searchResult, GraphContainer container) {
LOG.debug("SimpleSearchProvider->addVertexHopCriteria: called with search result: '{}'", searchResult);
final DefaultVertexHopCriteria criterion = new DefaultVertexHopCriteria(new DefaultVertexRef(searchResult.getNamespace(), searchResult.getId(), searchResult.getLabel()));
container.addCriteria(criterion);
LOG.debug("SimpleSearchProvider->addVertexHop: adding hop criteria {}.", criterion);
LOG.debug("SimpleSearchProvider->addVertexHop: current criteria {}.", Arrays.toString(container.getCriteria()));
}
Aggregations