diff --git a/cmd/hack/lmdb.go b/cmd/hack/lmdb.go index 3e7f3248e419bec27c803ed0d9d449abe05af858..91ebe99c83bdcaf1e3ced880f732f11f01e12f4f 100644 --- a/cmd/hack/lmdb.go +++ b/cmd/hack/lmdb.go @@ -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() @@ -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) }, @@ -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) { diff --git a/docs/lmdb/vis10_0.png b/docs/lmdb/vis10_0.png new file mode 100644 index 0000000000000000000000000000000000000000..a7d34ded255bf3eb7cae4dd10a12eaf70fc24446 Binary files /dev/null and b/docs/lmdb/vis10_0.png differ diff --git a/docs/lmdb/vis10_1.png b/docs/lmdb/vis10_1.png new file mode 100644 index 0000000000000000000000000000000000000000..336063280ef228bc95b4294b9ef47b3402aa098e Binary files /dev/null and b/docs/lmdb/vis10_1.png differ diff --git a/docs/lmdb/vis11_0.png b/docs/lmdb/vis11_0.png new file mode 100644 index 0000000000000000000000000000000000000000..a7d34ded255bf3eb7cae4dd10a12eaf70fc24446 Binary files /dev/null and b/docs/lmdb/vis11_0.png differ diff --git a/docs/lmdb/vis11_1.png b/docs/lmdb/vis11_1.png new file mode 100644 index 0000000000000000000000000000000000000000..336063280ef228bc95b4294b9ef47b3402aa098e Binary files /dev/null and b/docs/lmdb/vis11_1.png differ diff --git a/docs/lmdb/vis11_2.png b/docs/lmdb/vis11_2.png new file mode 100644 index 0000000000000000000000000000000000000000..7b9916e9873df51ced0481e84cfe88f9ffa535f0 Binary files /dev/null and b/docs/lmdb/vis11_2.png differ diff --git a/docs/lmdb/vis12_1.png b/docs/lmdb/vis12_1.png new file mode 100644 index 0000000000000000000000000000000000000000..203837a3a0a5beec32bfd6c486a3c08b2bdaa880 Binary files /dev/null and b/docs/lmdb/vis12_1.png differ diff --git a/docs/lmdb/vis12_2.png b/docs/lmdb/vis12_2.png new file mode 100644 index 0000000000000000000000000000000000000000..a39dc29c01e0676f594ce50f0689ec098c04e788 Binary files /dev/null and b/docs/lmdb/vis12_2.png differ diff --git a/docs/lmdb/vis12_51.png b/docs/lmdb/vis12_51.png new file mode 100644 index 0000000000000000000000000000000000000000..a39dc29c01e0676f594ce50f0689ec098c04e788 Binary files /dev/null and b/docs/lmdb/vis12_51.png differ diff --git a/docs/lmdb/vis13_2.png b/docs/lmdb/vis13_2.png new file mode 100644 index 0000000000000000000000000000000000000000..e59edf591cbb1b6ac17b4477fceebc84e85b797c Binary files /dev/null and b/docs/lmdb/vis13_2.png differ diff --git a/docs/lmdb/vis14_2.png b/docs/lmdb/vis14_2.png new file mode 100644 index 0000000000000000000000000000000000000000..463c75c11c0e1be1476d5a04dc6c02c663d50c4e Binary files /dev/null and b/docs/lmdb/vis14_2.png differ diff --git a/docs/lmdb/vis14_51.png b/docs/lmdb/vis14_51.png new file mode 100644 index 0000000000000000000000000000000000000000..463c75c11c0e1be1476d5a04dc6c02c663d50c4e Binary files /dev/null and b/docs/lmdb/vis14_51.png differ diff --git a/docs/lmdb/vis15_0.png b/docs/lmdb/vis15_0.png new file mode 100644 index 0000000000000000000000000000000000000000..519adf56defe6f3d0d052059c0f73603d1f2d9df Binary files /dev/null and b/docs/lmdb/vis15_0.png differ diff --git a/docs/lmdb/vis15_1.png b/docs/lmdb/vis15_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e07673d2ddbdf7ca4062a27f66910893b31210df Binary files /dev/null and b/docs/lmdb/vis15_1.png differ diff --git a/docs/lmdb/vis15_2.png b/docs/lmdb/vis15_2.png new file mode 100644 index 0000000000000000000000000000000000000000..314904b7322d307076d06f76db40e0fa1ca8caed Binary files /dev/null and b/docs/lmdb/vis15_2.png differ diff --git a/docs/lmdb/vis15_3.png b/docs/lmdb/vis15_3.png new file mode 100644 index 0000000000000000000000000000000000000000..e5d31275a20ca50f2d4503ba8816b9841ae27bc2 Binary files /dev/null and b/docs/lmdb/vis15_3.png differ diff --git a/docs/lmdb/vis15_4.png b/docs/lmdb/vis15_4.png new file mode 100644 index 0000000000000000000000000000000000000000..12f18ea3da4843460bd0791649a41580e301a3be Binary files /dev/null and b/docs/lmdb/vis15_4.png differ diff --git a/docs/lmdb/vis15_5.png b/docs/lmdb/vis15_5.png new file mode 100644 index 0000000000000000000000000000000000000000..ba7404a41d9ade0cbbe5de06779afc263c941d65 Binary files /dev/null and b/docs/lmdb/vis15_5.png differ diff --git a/docs/lmdb/vis15_6.png b/docs/lmdb/vis15_6.png new file mode 100644 index 0000000000000000000000000000000000000000..19b85e716352784fbf5c77ecf0267da83f20cd1b Binary files /dev/null and b/docs/lmdb/vis15_6.png differ diff --git a/docs/lmdb/vis15_7.png b/docs/lmdb/vis15_7.png new file mode 100644 index 0000000000000000000000000000000000000000..75646c6c286ca8f6b5370678f46f7d6103f2741a Binary files /dev/null and b/docs/lmdb/vis15_7.png differ diff --git a/docs/lmdb/vis16_0.png b/docs/lmdb/vis16_0.png new file mode 100644 index 0000000000000000000000000000000000000000..519adf56defe6f3d0d052059c0f73603d1f2d9df Binary files /dev/null and b/docs/lmdb/vis16_0.png differ diff --git a/docs/lmdb/vis16_1.png b/docs/lmdb/vis16_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e07673d2ddbdf7ca4062a27f66910893b31210df Binary files /dev/null and b/docs/lmdb/vis16_1.png differ diff --git a/docs/lmdb/vis16_3.png b/docs/lmdb/vis16_3.png new file mode 100644 index 0000000000000000000000000000000000000000..314904b7322d307076d06f76db40e0fa1ca8caed Binary files /dev/null and b/docs/lmdb/vis16_3.png differ diff --git a/docs/lmdb/vis16_4.png b/docs/lmdb/vis16_4.png new file mode 100644 index 0000000000000000000000000000000000000000..92bfb17ef01184de1a0137e44c9229b20162a7e7 Binary files /dev/null and b/docs/lmdb/vis16_4.png differ diff --git a/docs/lmdb/vis16_5.png b/docs/lmdb/vis16_5.png new file mode 100644 index 0000000000000000000000000000000000000000..9b53ff1e81a8cd26a192784fd965867b6f95005e Binary files /dev/null and b/docs/lmdb/vis16_5.png differ diff --git a/docs/lmdb/vis16_6.png b/docs/lmdb/vis16_6.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6553ccc24d0cef956e5b28899c77ddbb9b4e84 Binary files /dev/null and b/docs/lmdb/vis16_6.png differ diff --git a/docs/lmdb/vis16_7.png b/docs/lmdb/vis16_7.png new file mode 100644 index 0000000000000000000000000000000000000000..667095b045b0aa0e4973a1959ae3775cb469d8c5 Binary files /dev/null and b/docs/lmdb/vis16_7.png differ diff --git a/docs/lmdb/vis16_8.png b/docs/lmdb/vis16_8.png new file mode 100644 index 0000000000000000000000000000000000000000..9493c558ccc8c0ab0e4c80ee8d49d4cbf0d5b04d Binary files /dev/null and b/docs/lmdb/vis16_8.png differ diff --git a/docs/lmdb/vis1_0.png b/docs/lmdb/vis1_0.png new file mode 100644 index 0000000000000000000000000000000000000000..6116289c5cf48b2ea1eb155bb288c56f0de2bb94 Binary files /dev/null and b/docs/lmdb/vis1_0.png differ diff --git a/docs/lmdb/vis2_0.png b/docs/lmdb/vis2_0.png new file mode 100644 index 0000000000000000000000000000000000000000..9a286b849510925d6dc9ad2030a7731c937c4ff6 Binary files /dev/null and b/docs/lmdb/vis2_0.png differ diff --git a/docs/lmdb/vis3_0.png b/docs/lmdb/vis3_0.png new file mode 100644 index 0000000000000000000000000000000000000000..37b006054b2c70c0113e5a18566bbd151c210bcb Binary files /dev/null and b/docs/lmdb/vis3_0.png differ diff --git a/docs/lmdb/vis4_0.png b/docs/lmdb/vis4_0.png new file mode 100644 index 0000000000000000000000000000000000000000..72007824a644c37152407d9828f533ac2a3a424a Binary files /dev/null and b/docs/lmdb/vis4_0.png differ diff --git a/docs/lmdb/vis5_0.png b/docs/lmdb/vis5_0.png new file mode 100644 index 0000000000000000000000000000000000000000..c9f96ffb1d0b4d4da29b424e96146b9ac55dfa34 Binary files /dev/null and b/docs/lmdb/vis5_0.png differ diff --git a/docs/lmdb/vis6_0.png b/docs/lmdb/vis6_0.png new file mode 100644 index 0000000000000000000000000000000000000000..76f113150a618dd37f0e314032761a35704f514c Binary files /dev/null and b/docs/lmdb/vis6_0.png differ diff --git a/docs/lmdb/vis7_0.png b/docs/lmdb/vis7_0.png new file mode 100644 index 0000000000000000000000000000000000000000..429042b97c0072a1518dd33da7cf57e9a4b5d5a2 Binary files /dev/null and b/docs/lmdb/vis7_0.png differ diff --git a/docs/lmdb/vis8_0.png b/docs/lmdb/vis8_0.png new file mode 100644 index 0000000000000000000000000000000000000000..56070382ce0f9be7dd890652521b9ccf058568bd Binary files /dev/null and b/docs/lmdb/vis8_0.png differ diff --git a/docs/lmdb/vis8_1.png b/docs/lmdb/vis8_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e91904a14d1e2aabd4d90bd27284aecaf5321ed6 Binary files /dev/null and b/docs/lmdb/vis8_1.png differ diff --git a/docs/lmdb/vis9_0.png b/docs/lmdb/vis9_0.png new file mode 100644 index 0000000000000000000000000000000000000000..a7d34ded255bf3eb7cae4dd10a12eaf70fc24446 Binary files /dev/null and b/docs/lmdb/vis9_0.png differ