Search in sources :

Example 1 with StatsResults

use of org.apache.jena.tdb.solver.stats.StatsResults in project jena by apache.

the class tdbstats method exec.

@Override
protected void exec() {
    DatasetGraphTDB dsg = getDatasetGraphTDB();
    Node gn = getGraphName();
    StatsResults results = stats(dsg, gn);
    Stats.write(System.out, results);
}
Also used : Node(org.apache.jena.graph.Node) StatsResults(org.apache.jena.tdb.solver.stats.StatsResults) DatasetGraphTDB(org.apache.jena.tdb.store.DatasetGraphTDB)

Example 2 with StatsResults

use of org.apache.jena.tdb.solver.stats.StatsResults in project jena by apache.

the class TestStats method stats_02.

@Test
public void stats_02() {
    NodeId gid = nt.getNodeIdForNode(NodeFactory.createURI("g1"));
    StatsResults r = statsForGraph(gid);
    assertEquals(1, r.getCount());
    assertEquals(1, r.getPredicates().keySet().size());
}
Also used : NodeId(org.apache.jena.tdb.store.NodeId) StatsCollectorNodeId(org.apache.jena.tdb.solver.stats.StatsCollectorNodeId) StatsResults(org.apache.jena.tdb.solver.stats.StatsResults) Test(org.junit.Test) BaseTest(org.apache.jena.atlas.junit.BaseTest)

Example 3 with StatsResults

use of org.apache.jena.tdb.solver.stats.StatsResults in project jena by apache.

the class TestStats method stats_03.

@Test
public void stats_03() {
    NodeId gid = nt.getNodeIdForNode(NodeFactory.createURI("g2"));
    StatsResults r = statsForGraph(gid);
    assertEquals(2, r.getCount());
    assertEquals(1, r.getPredicates().keySet().size());
}
Also used : NodeId(org.apache.jena.tdb.store.NodeId) StatsCollectorNodeId(org.apache.jena.tdb.solver.stats.StatsCollectorNodeId) StatsResults(org.apache.jena.tdb.solver.stats.StatsResults) Test(org.junit.Test) BaseTest(org.apache.jena.atlas.junit.BaseTest)

Example 4 with StatsResults

use of org.apache.jena.tdb.solver.stats.StatsResults in project jena by apache.

the class TestStats method stats_04.

@Test
public void stats_04() {
    StatsResults r = statsForGraph(null);
    assertEquals(3, r.getCount());
    assertEquals(1, r.getPredicates().keySet().size());
}
Also used : StatsResults(org.apache.jena.tdb.solver.stats.StatsResults) Test(org.junit.Test) BaseTest(org.apache.jena.atlas.junit.BaseTest)

Example 5 with StatsResults

use of org.apache.jena.tdb.solver.stats.StatsResults in project jena by apache.

the class TestStats method stats_01.

@Test
public void stats_01() {
    StatsResults r = statsForDftGraph();
    assertEquals(1, r.getCount());
    assertEquals(1, r.getPredicates().keySet().size());
}
Also used : StatsResults(org.apache.jena.tdb.solver.stats.StatsResults) Test(org.junit.Test) BaseTest(org.apache.jena.atlas.junit.BaseTest)

Aggregations

StatsResults (org.apache.jena.tdb.solver.stats.StatsResults)5 BaseTest (org.apache.jena.atlas.junit.BaseTest)4 Test (org.junit.Test)4 StatsCollectorNodeId (org.apache.jena.tdb.solver.stats.StatsCollectorNodeId)2 NodeId (org.apache.jena.tdb.store.NodeId)2 Node (org.apache.jena.graph.Node)1 DatasetGraphTDB (org.apache.jena.tdb.store.DatasetGraphTDB)1