2import ProjectM36.Relation
5import qualified ProjectM36.Attribute as A
6import qualified Data.Text as T
7import qualified Data.Vector as V
9-- returns a relation with tupleCount tuples with a set of integer attributes attributesCount long
10-- this is useful for performance and resource usage testing
11matrixRelation :: Int -> Int -> Either RelationalError Relation
12matrixRelation attributeCount tupleCount = do
13 let attrs = A.attributesFromList $ map (\c-> Attribute (T.pack $ "a" ++ show c) IntAtomType) [0 .. attributeCount-1]
14 tuple tupleX = RelationTuple attrs (V.generate attributeCount (\_ -> IntAtom tupleX))
15 tuples = map (\c -> tuple c) [0 .. tupleCount]
16 mkRelationDeferVerify attrs (RelationTupleSet tuples)
20 bgroup "Big Relation" [
21 bench "100" $ whnf (matrixRelation 10) 100,
22 bench "1000" $ whnf (matrixRelation 10) 1000,
23 bench "10000" $ whnf (matrixRelation 10) 10000
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list