public class TestInsertRate extends AbstractTripleStoreTestCase
The s:p:o of the statements can use random selection without replacement from a class space, a property space, and a literal space. Those spaces can be pre-populated such that we can insert up to ( #class * #prop * #value ) distinct statements if we select subjects from the class space, predicates from the property space, and objects from the literal space and the class space. However, we should also select objects from the class space, which produces additional distinct statements. The literal space should be divided into plain literals, literals with language tags, and typed literals. The space of types are the predefined XSD types plus those defined by RDFS (rdf:xml).
In order to test plain RDF insert, we do not need to do anything beyond this.
In order to test RDFS insert, there needs to be some ontology. This can be introduced by creating a class hierarchy from the class space and a property heirarchy from the property space. Such a hierarchy could be formed by either by inserting or removing rdfs:subClassOf (or rdfs:subPropertyOf) assertions from a fully connected matrix in the appropriate space.
FIXME modify to use variable length unsigned byte[] keys and the
BytesUtil.UnsignedByteArrayComparator
and see how that effects performance -
the performance will be the base line on which I can then improve. Once I
have that baseline I can then go into the btree code and strip out the
polymorphic keys (except maybe int and long) and add in support for prefix
btrees and choosing short separators.
Modifier and Type | Class and Description |
---|---|
static class |
TestInsertRate.XMLSchema
Defines a variety of URIs relevant to the XML Schema Datatypes
specification.
|
AbstractTestCase.StatementVerifier
TestCase2.MyProperties, TestCase2.RandomType
NULL
_randomType, log
Constructor and Description |
---|
TestInsertRate() |
TestInsertRate(String name) |
Modifier and Type | Method and Description |
---|---|
void |
doTest(int nclass,
int nproperty,
int nliteral,
int litsize)
Primary driver for the insert rate test.
|
Writer |
getWriter(String ext)
Returns a writer named by the test and having the specified
filename extension.
|
static void |
main(String[] args)
Large scale insert test.
|
static String |
perSec(int n,
long elapsed)
Returns the quantity n expressed as a per-second rate or
"N/A" if the elapsed time is zero.
|
void |
test_small() |
void |
test_tiny() |
getDelegate, getOurDelegate, getProperties, getStore, getStore, reopenStore, setDelegate, setUp, tearDown
assertEquals, assertEquals, assertEquals, assertEquals, assertLexiconIndicesConsistent, assertSameSPOs, assertSameSPOs, assertSameSPOsAnyOrder, assertSameSPOsAnyOrder, assertSameStatements, assertSameStatements, assertStatementIndicesConsistent, checkIfProxy, recursiveDelete, setUp, tearDown
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public TestInsertRate()
public TestInsertRate(String name)
name
- public static void main(String[] args) throws Exception
args
- unused - just edit the code.Exception
public void doTest(int nclass, int nproperty, int nliteral, int litsize) throws IOException
nclass
- The #of distinct classes.nproperty
- The #of distinct properties.nliteral
- The #of plain literals, the #of literals for each language
type, and the #of typed literals for each datatype URI.litsize
- The average size of a literal. The generated literals use a
normal distribution with this as their mean length (in
characters).IOException
public static final String perSec(int n, long elapsed)
public Writer getWriter(String ext) throws IOException
IOException
public void test_tiny() throws IOException
IOException
public void test_small() throws IOException
IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.