Skip to content

Commit

Permalink
Add lmdb guide visualisations (#1348)
Browse files Browse the repository at this point in the history
* Add lmdb guide visualisations

* updated names, remove double-tap visualisations
  • Loading branch information
AlexeyAkhunov authored Nov 11, 2020
1 parent e71c3ca commit 10f338b
Show file tree
Hide file tree
Showing 38 changed files with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions cmd/hack/lmdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,6 @@ func change1(tx ethdb.Tx) (bool, error) {
return true, nil
}

func doubleTap(_ ethdb.KV, tx ethdb.Tx) (bool, error) {
c := tx.Cursor("t")
defer c.Close()
k := fmt.Sprintf("%05d", 0)
if err := c.Put([]byte(k), []byte("another_short_value_2")); err != nil {
return false, err
}
return true, nil
}

func change2(tx ethdb.Tx) (bool, error) {
c := tx.Cursor("t")
defer c.Close()
Expand Down Expand Up @@ -414,22 +404,7 @@ func defrag() error {
if err := defragSteps("vis14", manyBucketCfg, generate8, func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return false, generate9(tx, 300000) }, dropGradually); err != nil {
return err
}
if err := defragSteps("noDoubleTap", oneBucketCfg,
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return true, generate2(tx, 1000) },
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return change1(tx) },
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return change2(tx) },
); err != nil {
return err
}
if err := defragSteps("doubleTap", oneBucketCfg,
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return true, generate2(tx, 1000) },
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return change1(tx) },
doubleTap,
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return change2(tx) },
); err != nil {
return err
}
if err := defragSteps("noReader", oneBucketCfg,
if err := defragSteps("vis15", oneBucketCfg,
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return true, generate2(tx, 1000) },
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return change1(tx) },
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return change2(tx) },
Expand All @@ -443,7 +418,7 @@ func defrag() error {
}
readerStartCh := make(chan struct{})
readerErrorCh := make(chan error)
if err := defragSteps("withReader", oneBucketCfg,
if err := defragSteps("vis16", oneBucketCfg,
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return true, generate2(tx, 1000) },
func(_ ethdb.KV, tx ethdb.Tx) (bool, error) { return change1(tx) },
func(kv ethdb.KV, tx ethdb.Tx) (bool, error) {
Expand Down
Binary file added docs/lmdb/vis10_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis10_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis11_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis11_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis11_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis12_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis12_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis12_51.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis13_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis14_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis14_51.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis15_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis15_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis15_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis15_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis15_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis15_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis15_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis15_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis16_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis16_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis16_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis16_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis16_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis16_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lmdb/vis16_7.png
Binary file added docs/lmdb/vis16_8.png
Binary file added docs/lmdb/vis1_0.png
Binary file added docs/lmdb/vis2_0.png
Binary file added docs/lmdb/vis3_0.png
Binary file added docs/lmdb/vis4_0.png
Binary file added docs/lmdb/vis5_0.png
Binary file added docs/lmdb/vis6_0.png
Binary file added docs/lmdb/vis7_0.png
Binary file added docs/lmdb/vis8_0.png
Binary file added docs/lmdb/vis8_1.png
Binary file added docs/lmdb/vis9_0.png

0 comments on commit 10f338b

Please sign in to comment.