Commit Graph

15 Commits

Author SHA1 Message Date
Alexander Neumann d3fe4a7f6d Close Reader after read 2015-02-17 23:37:45 +01:00
Alexander Neumann b6f25aa690 Remove Each(), add basic stats 2015-02-17 23:11:56 +01:00
Alexander Neumann 5a16a66973 Add 'plaintext' parameter to key.Decrypt()
% benchcmp /tmp/{before,after}
    benchmark                         old ns/op     new ns/op     delta
    BenchmarkChunkEncrypt             261144414     260252046     -0.34%
    BenchmarkChunkEncryptParallel     261201438     261267029     +0.03%
    BenchmarkArchiveDirectory         0.00          0.00          +0.00%
    BenchmarkEncryptWriter            88297245      87526529      -0.87%
    BenchmarkEncrypt                  87406446      87917897      +0.59%
    BenchmarkDecryptReader            89948630      90042541      +0.10%
    BenchmarkEncryptDecryptReader     178374144     179477306     +0.62%
    BenchmarkDecrypt                  88289705      87937073      -0.40%
    BenchmarkSaveJSON                 213917        213571        -0.16%
    BenchmarkSaveFrom                 74881361      75111148      +0.31%

    benchmark                         old MB/s     new MB/s     speedup
    BenchmarkChunkEncrypt             40.15        40.29        1.00x
    BenchmarkChunkEncryptParallel     40.14        40.13        1.00x
    BenchmarkEncryptWriter            95.00        95.84        1.01x
    BenchmarkEncrypt                  95.97        95.41        0.99x
    BenchmarkDecryptReader            93.26        93.16        1.00x
    BenchmarkEncryptDecryptReader     47.03        46.74        0.99x
    BenchmarkDecrypt                  95.01        95.39        1.00x
    BenchmarkSaveFrom                 56.01        55.84        1.00x

    benchmark                         old allocs     new allocs     delta
    BenchmarkChunkEncrypt             113            112            -0.88%
    BenchmarkChunkEncryptParallel     104            103            -0.96%
    BenchmarkArchiveDirectory         0              0              +0.00%
    BenchmarkEncryptWriter            20             20             +0.00%
    BenchmarkEncrypt                  14             14             +0.00%
    BenchmarkDecryptReader            18             18             +0.00%
    BenchmarkEncryptDecryptReader     40             45             +12.50%
    BenchmarkDecrypt                  17             16             -5.88%
    BenchmarkSaveJSON                 125            125            +0.00%
    BenchmarkSaveFrom                 116            119            +2.59%

    benchmark                         old bytes     new bytes     delta
    BenchmarkChunkEncrypt             8515750       118956        -98.60%
    BenchmarkChunkEncryptParallel     8515766       118972        -98.60%
    BenchmarkArchiveDirectory         0             0             +0.00%
    BenchmarkEncryptWriter            28927         28927         +0.00%
    BenchmarkEncrypt                  422313        2473          -99.41%
    BenchmarkDecryptReader            527827        527827        +0.00%
    BenchmarkEncryptDecryptReader     4100824       4100870       +0.00%
    BenchmarkDecrypt                  8391127       2509          -99.97%
    BenchmarkSaveJSON                 9208          9208          +0.00%
    BenchmarkSaveFrom                 39694         40541         +2.13%
2015-02-17 21:10:26 +01:00
Alexander Neumann a5e13f1280 Switch SaveFrom() to Reader/Writer
benchcmp:

    benchmark             old ns/op     new ns/op     delta
    BenchmarkSaveFrom     76159512      74795081      -1.79%

    benchmark             old MB/s     new MB/s     speedup
    BenchmarkSaveFrom     55.07        56.08        1.02x

    benchmark             old allocs     new allocs     delta
    BenchmarkSaveFrom     97             117            +20.62%

    benchmark             old bytes     new bytes     delta
    BenchmarkSaveFrom     433826        40117         -90.75%

    benchmark                       old ns/op       new ns/op       delta
    BenchmarkArchiveDirectory-4     29539886128     29262480891     -0.94%

    benchmark                       old allocs     new allocs     delta
    BenchmarkArchiveDirectory-4     540048         709662         +31.41%

    benchmark                       old bytes     new bytes     delta
    BenchmarkArchiveDirectory-4     404573416     443098816     +9.52%
2015-02-16 22:42:11 +01:00
Alexander Neumann 731e81ef06 Re-use zlib writers to reduce memory usage
benchcmp:

    benchmark                       old ns/op       new ns/op       delta
    BenchmarkArchiveDirectory-4     29624960475     29511001504     -0.38%
    BenchmarkSaveJSON-4             379833          225609          -40.60%

    benchmark                       old allocs     new allocs     delta
    BenchmarkArchiveDirectory-4     546736         540642         -1.11%
    BenchmarkSaveJSON-4             150            126            -16.00%

    benchmark                       old bytes      new bytes     delta
    BenchmarkArchiveDirectory-4     1372476952     438519336     -68.05%
    BenchmarkSaveJSON-4             1462773        9087          -99.38%
2015-02-16 22:35:26 +01:00
Alexander Neumann b762a342d3 SaveJSON: use streams 2015-02-16 00:24:58 +01:00
Alexander Neumann 68911ef11d server: use streams for LoadJSON*() 2015-02-15 23:49:06 +01:00
Alexander Neumann 72c951a6ec Simply backend interface
Rename CreateBlob() method to Create(), remove old Create* methods
2015-02-15 17:26:20 +01:00
Alexander Neumann 35636a9d92 Introduce CreateBlob() method for backend 2015-02-15 17:09:49 +01:00
Alexander Neumann 0f36b19a4c Update Server to match new Backend interface 2015-02-11 22:46:40 +01:00
Alexander Neumann bda33e612c Implement streaming chunker using io.Reader 2015-02-09 00:28:54 +01:00
Alexander Neumann e2a407babb Create large buffer when encrypting a large tree
This fixes #80
2015-01-31 21:18:51 +01:00
Alexander Neumann 203a911de9 Refactor repository structure
Merge Map data type into Tree.
2015-01-14 16:34:30 +01:00
Alexander Neumann ef41a77aff Remove explicit key handling 2014-12-21 18:10:19 +01:00
Alexander Neumann cc147c002e Introduce type Server 2014-12-21 17:37:29 +01:00