Commit graph

77 commits

Author SHA1 Message Date
d639aa3205 Clean up Linkage definition
A linkage is a direction/value pair, and that's all. A set of these can
have helper functions and the like. Cleans up some assumptions of
functionality that isn't useful (yet).
2015-06-02 14:46:19 -04:00
Andrew Dunham
189961cb8d Remove deprecated ResultTree API 2015-04-28 15:57:35 -07:00
c3c5fe50c1 Fix nits 2015-04-25 19:08:20 -04:00
355c8ee6bc generalize Linkage, add relevant comments 2015-04-19 20:07:14 -04:00
6201e709ef Better size reporting 2015-04-19 16:43:15 -04:00
b90ba7cd77 don't replace unless strictly better 2015-04-19 14:59:22 -04:00
4e311177f1 cache size checks in mongo backend 2015-04-19 13:43:10 -04:00
5be1df3be3 initial mongo indexed linksto 2015-04-19 13:43:10 -04:00
Andrew Dunham
1990eba055 Stop calling glog.Fatal* in a bunch of places 2015-04-15 14:07:45 -07:00
Andrew Dunham
1b6395ed0a Make Close() method on Iterators return an error 2015-04-14 20:17:31 -07:00
Andrew Dunham
bd2b2b73cf Fix Err fallout for graph/mongo iterator 2015-04-14 19:11:39 -07:00
Andrew Dunham
6aad2b1818 Add static type assertions
Assert that various iterators satisfy the graph.Nexter interface
2015-04-14 16:28:46 -07:00
=
d545fc4b44 renamed GetType() to Type(), fixed iterator tests 2015-02-21 23:55:36 +01:00
=
35ccfe7677 Added functionality so quadstore is generated per request (if needed) for the new appengine backend \n CR : nobody \n Tests run: unit tests 2015-02-21 23:46:11 +01:00
2c74cb1657 Merge pull request #217 from barakmich/primarykey
Rewrite keys into concrete types, remove key package
2015-02-21 16:37:55 -05:00
67673b31f4 Clean up a little lint and some shadowed variables 2015-02-21 16:21:48 -05:00
cf3e286d15 Rewrite keys into concrete types, remove key package 2015-02-21 16:19:51 -05:00
l.albertalli
472d86223e Changed the ApplyDeltas signature 2015-02-10 18:17:54 -08:00
l.albertalli
50c3e5f93c Shortended function signature and changed flag priority 2015-02-10 10:48:02 -08:00
l.albertalli
6134bc8bdd Moved configuration to Quadwriter and added to config file 2015-02-09 18:43:26 -08:00
l.albertalli
ce1cce5a01 Added command line options to ignore duplicate quad in add or missing quad in delete 2015-02-06 17:49:16 -08:00
d2434b024d Merge pull request #180 from bkendall/fix-mongo-cache-no-tests
Prevent empty values in cache (using mongo)
2015-02-03 18:58:33 -05:00
kortschak
46f987ca51 Make graph.Delta zero state invalid for use
Previously, an incorrectly initialised Delta (omission of Action) would
result in an Add operation. Make that detectable and return an error.
2015-01-27 08:39:50 +10:30
panamafrancis
abda6cbbb0 Refactoring of Delta.IDs & horizon functionality with a PrimaryKey type, needed for implementing UUID based primary keys for backends such as the appengine datastore \n Tests: at top level and if available per backend, if not then just visual 2014-12-01 23:00:06 +01:00
Bryan Kendall
03c82c7463 prevent cache from storing empty values 2014-11-01 17:18:28 -07:00
kortschak
e2eea6c283 Convert Type fields to use graph.Type
Add text encoding methods to replace string storage.
2014-09-05 09:49:15 +09:30
kortschak
62013d3dfc Replace DebugString with Describe
This change makes tree description completely open to mechanical
analysis and ensures consistency between description formats for each of
the iterator types.

Renamed StatsContainer.(Kind -> Type) for consistency.
2014-09-05 09:32:09 +09:30
kortschak
8118c8d3cc Quieten deadcode 2014-08-28 12:04:45 +09:30
kortschak
484bf145a8 Remove non-documentation lint
Because of extensive nature of changes, tested all three non-memstore
backends - passed.
2014-08-28 11:51:39 +09:30
kortschak
a22eb42482 Make hashOf a function 2014-08-27 23:25:50 +09:30
kortschak
5e9da0347c Simplify method name 2014-08-27 21:40:36 +09:30
kortschak
443a091b72 Rename triple entities were relevant 2014-08-27 21:27:01 +09:30
kortschak
12859a69a5 Rename triple* -> quad* files 2014-08-27 19:20:35 +09:30
kortschak
93c9814147 Quieten go vet in mongo 2014-08-21 19:33:00 +09:30
8720e17d87 Merge hash pool in from master
Conflicts:
	graph/leveldb/triplestore.go
	graph/mongo/triplestore.go
2014-08-14 21:03:36 -04:00
kortschak
737037a894 Experiment with sync.Pool 2014-08-14 19:03:55 +09:30
d2026ea271 fix mongo indexing name mismatch 2014-08-14 01:57:03 -04:00
f967b36f84 comments and concretized deltas 2014-08-14 01:24:39 -04:00
fe0569c9d4 merge with master 2014-08-13 23:03:07 -04:00
cfca7db47c Go style
My C++ programmer's disease was acting up.
2014-08-13 14:54:36 -04:00
03798bc4fa fix mongo hasher 2014-08-13 13:29:08 -04:00
48711af1d9 Mongo log works (and bug fixed) 2014-08-10 21:05:39 -04:00
6d22037602 add iterator check for mongo 2014-08-10 19:41:22 -04:00
ff148f58f8 first swing at mongo indexing (iterator todo) 2014-08-10 19:35:26 -04:00
kortschak
2d4c07b56d Make db name-literal agnostic
Move the persistence characteristic of the store into the graph registry
and provide an API hook to get that information.

Add error return for init on a non-persistent store.

Updates #35.
2014-08-08 08:36:49 +09:30
kortschak
62785d25c2 Merge branch 'master' into nexter
Conflicts:
	graph/leveldb/all_iterator.go
	graph/leveldb/iterator.go
	graph/memstore/triplestore.go
	query/gremlin/finals.go
2014-08-07 06:57:45 +09:30
kortschak
6acfdcc5d6 Use concrete value for quad.Quad
Comparison of -short benchmarks in cayley.

$ benchcmp pointer.bench concrete.bench
benchmark                                   old ns/op     new ns/op	delta
BenchmarkNamePredicate                      1673276       1655093	-1.09%
BenchmarkLargeSetsNoIntersection            318985907     261499984	-18.02%
BenchmarkNetAndSpeed                        104403743     41516981	-60.23%
BenchmarkKeanuAndNet                        17309258      16857513	-2.61%
BenchmarkKeanuAndSpeed                      20159161      19282833	-4.35%

Comparison of pathological cases are not so happy.

benchmark                                   old ns/op       new ns/op		delta
BenchmarkVeryLargeSetsSmallIntersection     55269775527     246084606672	+345.24%
BenchmarkHelplessContainsChecker            23436501319     24308906949		+3.72%

Profiling the worst case:

Pointer:
Total: 6121 samples
    1973  32.2%  32.2%     1973  32.2% runtime.findfunc
     773  12.6%  44.9%      773  12.6% readvarint
     510   8.3%  53.2%      511   8.3% step
     409   6.7%  59.9%      410   6.7% runtime.gentraceback
     390   6.4%  66.2%      391   6.4% pcvalue
     215   3.5%  69.8%      215   3.5% runtime.funcdata
     181   3.0%  72.7%      181   3.0% checkframecopy
     118   1.9%  74.6%      119   1.9% runtime.funcspdelta
      96   1.6%  76.2%       96   1.6% runtime.topofstack
      76   1.2%  77.5%       76   1.2% scanblock

Concrete:
Total: 25027 samples
    9437  37.7%  37.7%     9437  37.7% runtime.findfunc
    3853  15.4%  53.1%     3853  15.4% readvarint
    2366   9.5%  62.6%     2366   9.5% step
    2186   8.7%  71.3%     2186   8.7% runtime.gentraceback
    1816   7.3%  78.5%     1816   7.3% pcvalue
    1016   4.1%  82.6%     1016   4.1% runtime.funcdata
     859   3.4%  86.0%      859   3.4% checkframecopy
     506   2.0%  88.1%      506   2.0% runtime.funcspdelta
     410   1.6%  89.7%      410   1.6% runtime.topofstack
     303   1.2%  90.9%      303   1.2% runtime.newstack
2014-08-05 23:25:02 +09:30
kortschak
b1a70d99aa Simplify Nexter interface
This change allows a Nexter to be used in the same manner as a scanner
using a for graph.Next(it) {} construction.

It is important that graph.Next(it) and any associated it.Result() calls
operate on the same iterator.
2014-08-01 09:15:02 +09:30
kortschak
f8e28e066e Rename NextResult -> NextPath
See discussion in #92.
2014-08-01 07:27:16 +09:30
cb177aa390 Merge pull request #92 from kortschak/names
Rename Check-ish -> Contains-ish
2014-07-31 16:58:53 -04:00