Commit Graph

44 Commits

Author SHA1 Message Date
Aaron Boodman 2386afc7fb Move stuff that is not samples out of samples directory (#1943)
* Move samples/go/*perf-reg to go/perf/

They aren't really samples.

* Move samples/go/util/check_error.go to go/d

* Remove samples/go/util/client_flags.go - unused

* remove httpcache.go - unused

* Remove samples/go/util/rungen.go - no generated code here anymore

* move NomsValueFromJSON to go/util/jsontonoms
2016-07-01 11:04:17 -07:00
Aaron Boodman fcca02d6b0 Fix crash in hr when dataset spec invalid (#1939)
Also remove test util code from the two simpler Go samples. I think
we will want to distinguish between "samples" and "utilities". The
former should be as easy to understand and lightweight as possible,
while the latter will tend to be more a real part of the project
that is maintained, tuned, relied upon, etc.

The former should only rely on the Noms SDK and the Go stdlib. The
latter should follow normal Noms internal coding conventions.
2016-07-01 10:27:44 -07:00
Erik Arvidsson 0a502c3ee4 Fix some js tests (#1932) 2016-06-29 15:57:53 -07:00
Rafael Weinstein f464a2d94f Map.MX() -> NewStreamingMap (#1918) 2016-06-27 16:06:40 -07:00
Rafael Weinstein aacfe751fa Add (temporary) custom leaf-chunker for blobs (#1911)
Add (temporary) custom leaf-chunker for blobs
2016-06-27 15:16:50 -07:00
cmasone-attic d1f46401d1 Go: Add Mx() for Noms Maps (#1876)
As one step towards #1819, we've created MapMutator, which can take a
bunch of (what would normally be) Map.Set() calls and batch them up to
be applied all at once. The keys and values are held in a LevelDB cache
until everything's done. Usage looks like this:

 m := types.NewMap()
 mx := m.Mx()
 mx = mx.Set(String("foo"), String("bar")).Set(String("baz"), Number(42))
 m = mx.Finish()

We intend to make this the only way to modify collections, but at first
this will only work on an empty NomsMap.
2016-06-27 13:52:52 -07:00
Rafael Weinstein 2a04a0abaf Add sizecache to ValueStore (#1909)
Add sizecache to ValueStore.
2016-06-25 07:09:08 -07:00
Ben Kalman 0f4ed16641 Meta nodes encode a fake simple ref of non-ordered values (#1893)
Previously when we had an ordered (set/map) prolly tree containing
non-ordered values (blobs/refs/etc), we'd put the ref of the largest
value in each meta node, complete with its full type info and height.

This is wasteful, all we really need is the hash of the largest item for
searching the tree. In lieu of encoding just the hash - which isn't a
value - this patch creates a fake Ref<Boolean> with height 0.
2016-06-23 15:59:26 -07:00
Aaron Boodman 870183f22b samples/js/fs: remove extraneous ref links (#1886) 2016-06-23 05:26:01 -07:00
Erik Arvidsson ebd9a88d23 JS: Fix http batch store (#1885)
There were a few issues here:

1. The version header was not always passed to fetch
2. HTTP headers are case insensitive and Node an Fetch uses lower case.
3. The old code used a Map instead of an object as map. Node and Fetch
   uses an object as map. Now we just pass along the response headers.

Fixes #1881
Closes #1880 (which this is partially based in)
2016-06-23 17:41:56 +08:00
Erik Arvidsson 123544c4f7 Fix samples/js/fs (#1884)
The values did not match the type declaration
2016-06-23 16:34:47 +08:00
Dan Willhite 095d49fa84 New error handling. 2016-06-22 12:11:31 -07:00
Aaron Boodman ed3f635979 Fix bonehead mistake in hr test -- test function not being run (#1869) 2016-06-22 10:18:08 -07:00
Aaron Boodman 192e7c471b Remove forked version of buzhash from vendor dir (#1868)
Replace with upstream

Fixes #1864
2016-06-22 09:54:15 -07:00
Chris Masone 15e1ceef03 Update hr sample canned database 2016-06-22 09:10:06 -07:00
cmasone-attic 4d5eb3b334 Version Noms SDK and storage (#1841)
ChunkStores provide a Version() method so that anyone directly
using a ChunkStore (e.g. BatchStoreAdaptor) can retrieve and
check the version of the underlying store.

remoteDatabaseServer checks the version of the ChunkStore it's
backed by at startup, and then provides that version as an HTTP
header to all clients. In Go, httpBatchStore checks this header
anytime it gets a response from the server and bails if there's
version skew.

In Go, the responsibility for checking whether the running code and
the data being accessed lies with the BatchStore layer. In JS, there
is code in fetch.js that checks the header mentioned above.

Towards #1561
2016-06-21 20:55:07 -07:00
Dan Willhite ad9c383744 Fix description of authkey argument. 2016-06-21 09:24:36 -07:00
Dan Willhite 7c6048cc67 Set noms version of splore to latest version. 2016-06-16 16:58:00 -07:00
Aaron Boodman d58d558548 Make types.String not cache ref (#1836)
Fixes https://github.com/attic-labs/noms/issues/1542
2016-06-16 07:04:28 -07:00
Dan Willhite 8d112992c6 Move demo-server from it's own project into noms. 2016-06-15 14:06:23 -07:00
Rafael Weinstein 9d33933a4f close db in url fetch (#1826) 2016-06-15 12:16:52 -07:00
Dan Willhite a3a78d695d Add HeadValue() and MaybeHeadValue() to dataset.go and js equivalents
Fixes #1801.
2016-06-15 11:16:25 -07:00
cmasone-attic 9c5d3289fb Merge pull request #1815 from cmasone-attic/export-prof
Add profiling to csv-export
2016-06-14 14:42:49 -07:00
Chris Masone 29e391c6af Add profiling to csv-export 2016-06-14 14:24:17 -07:00
Aaron Boodman 01be9f1705 Introduce spec.Get(Database|Dataset|Path) conveniences (#1813)
Fixes: https://github.com/attic-labs/noms/issues/1800
2016-06-14 14:06:22 -07:00
Aaron Boodman 2d3dd6d925 Update README.md 2016-06-13 16:12:57 -07:00
Aaron Boodman 16372d7376 Update README.md 2016-06-13 11:03:39 -07:00
Aaron Boodman a1c1b6a07d Introduce samples/go/hr: a very basic toy person database (#1804) 2016-06-13 10:48:41 -07:00
Aaron Boodman fcf772dccd move noms/samples/go/flags -> noms/go/spec (#1799) 2016-06-12 15:42:50 -07:00
Rafael Weinstein 3633a8433d jsCodecPerfRig (#1796) 2016-06-11 09:11:11 -07:00
Rafael Weinstein 61d4996125 Fix command line output (#1786) 2016-06-10 15:33:30 -07:00
Chris Masone e35a705da5 Go: Simplify enabling profiling
One side effect of the way that Go's flag library works is that any
flag that's defined at the global scope by any library that's built
into your binary shows up in your help -- whether you honor it or
not. Arguably, including the library and calling its entry points
should be tantamount to honoring the flags. This change makes the
profiling flags behave that way -- there's one function that you call
to turn on whichever kinds of profiling the user specifies on the
command line. It returns an object with a Stop() method that you call
to shut down profiling and flush data, like so:

defer profile.MaybeStartProfile().Stop()
2016-06-10 09:01:13 -07:00
Rafael Weinstein 2a7c0ab5e1 Cleanup/Improve codec perf rig (#1775) 2016-06-10 08:28:59 -07:00
Rafael Weinstein 801bb4a392 go codec-perf-rig (#1768) 2016-06-09 14:35:16 -07:00
Aaron Boodman 89f07b675a csv/csv-import: add support for importing to map. (#1754)
csv/csv-import: add support for importing to map.
2016-06-08 15:18:04 -07:00
cmasone-attic 00af81440f Move Go profiling helpers out of samples/ (#1757)
These are used in cmd as well, so it seemed weird to have
them over in samples/util
2016-06-08 14:26:44 -07:00
Erik Arvidsson ee21e6b9de Fix samples/js (#1755) 2016-06-08 13:35:57 -07:00
Rafael Weinstein 335a28026c parallelize csv export (#1746) 2016-06-08 10:28:57 -07:00
Dan Willhite f371a235d5 Change dataspec syntax to use '::' in path specs. 2016-06-07 15:01:26 -07:00
Erik Arvidsson 4af0ca1efb Fix issue with in browser Hash (#1738)
Also, make Hash not copy the bytes.
2016-06-06 17:11:34 -07:00
Erik Arvidsson bc9f9d19e1 Go: Make StructDesc use slices for names and types instead of a map (#1741)
The map showed up in benchmarks...

Fixes #1716
2016-06-06 16:58:40 -07:00
Erik Arvidsson e4b7d13416 Add license field to all the package.json file (#1742)
Issue #1307
2016-06-06 16:56:10 -07:00
Mike Gray 7b914891a5 adding initial encoding test harness (#1653) 2016-06-06 15:38:09 -04:00
Aaron Boodman 8aab8924d1 Rename clients to samples 2016-06-05 02:37:28 -07:00