pry-auto_benching.rb 2.10.2 → 2.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +26 -17
- data/lib/pry-auto_benching/version.rb +1 -1
- data/pry-auto_benching.gemspec +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 696bf09af2e1154b97fc3d5fef3008a88c4ef6c9f4f196a304386b0545eccec6
         | 
| 4 | 
            +
              data.tar.gz: e0dcd556fc9442e11816ba6dc170b2285f32cc222ed1ccc404653d54918c9cfc
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a85843a8588f075033a94193f279bd7a78a1cf8b0f6302f75d213fdf56ab7e7390c220829fd5456555610299e0fc42af66f7eb4420aed829cc347ce1e1249257
         | 
| 7 | 
            +
              data.tar.gz: e1a184b7d9bc7425584747f43e689557cd47bb9faa6e65d6ab23c503d24dd741625181a6299462cf0d37f5b40d320bf9ad76a12ce53ca421d474c374f9bd0696
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -1,11 +1,21 @@ | |
| 1 1 | 
             
            # pry-auto_benching.rb
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 3 | 
            +
            * <a href="#introduction">Introduction</a>
         | 
| 4 | 
            +
            * <a href='#configuration'>Configuration (optional)</a>
         | 
| 5 | 
            +
            * <a href='#examples'>Examples</a>
         | 
| 6 | 
            +
            * <a href='#accuracy'>Accuracy</a>
         | 
| 7 | 
            +
            * <a href='#install'>Install</a>
         | 
| 8 | 
            +
            * <a href='#license'>License</a>
         | 
| 4 9 |  | 
| 5 | 
            -
            ##  | 
| 10 | 
            +
            ## <a id='introduction'>Introduction</a>
         | 
| 6 11 |  | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 12 | 
            +
            pry-auto_benching.rb automates benchmarking inside the Pry REPL.
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            ## <a id='configuration'>Configuration (optional)</a>
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            Configuration isn't required unless you want to change a default. <br>
         | 
| 17 | 
            +
            To change the defaults, open `~/.pryrc` and change one or more of the
         | 
| 18 | 
            +
            following options:
         | 
| 9 19 |  | 
| 10 20 | 
             
            ```ruby
         | 
| 11 21 | 
             
            Pry.configure do |config|
         | 
| @@ -50,11 +60,11 @@ Pry.configure do |config| | |
| 50 60 | 
             
            end
         | 
| 51 61 | 
             
            ```
         | 
| 52 62 |  | 
| 53 | 
            -
            ## Examples
         | 
| 63 | 
            +
            ## <a id='examples'>Examples</a>
         | 
| 54 64 |  | 
| 55 65 | 
             
            __1.__
         | 
| 56 66 |  | 
| 57 | 
            -
             | 
| 67 | 
            +
            Display help by running `auto-benching -h`:
         | 
| 58 68 |  | 
| 59 69 | 
             
                Usage: auto-benching [options] [enable|disable]
         | 
| 60 70 |  | 
| @@ -68,8 +78,7 @@ Show help by running `auto-benching -h`: | |
| 68 78 |  | 
| 69 79 | 
             
            __2.__
         | 
| 70 80 |  | 
| 71 | 
            -
             | 
| 72 | 
            -
            This is the default.
         | 
| 81 | 
            +
            The prompt is updated with benchmark results (default behavior).
         | 
| 73 82 |  | 
| 74 83 | 
             
                [7] pry(main)> sleep 0.2
         | 
| 75 84 | 
             
                => 0
         | 
| @@ -81,7 +90,7 @@ This is the default. | |
| 81 90 |  | 
| 82 91 | 
             
            __3.__
         | 
| 83 92 |  | 
| 84 | 
            -
             | 
| 93 | 
            +
            `_pry_.output` is updated with benchmark results.
         | 
| 85 94 |  | 
| 86 95 | 
             
                [6] pry(main)> auto-benching --target-display output
         | 
| 87 96 | 
             
                Display changed to 'output'
         | 
| @@ -97,7 +106,7 @@ An example showing `:output` set as the `target_display`. | |
| 97 106 |  | 
| 98 107 | 
             
            __4.__
         | 
| 99 108 |  | 
| 100 | 
            -
             | 
| 109 | 
            +
            Display a history of benchmark results for the current Pry session with
         | 
| 101 110 | 
             
            `auto-benching --past`:
         | 
| 102 111 |  | 
| 103 112 | 
             
                [6] 0.5s (main)> auto-benching --past
         | 
| @@ -116,7 +125,7 @@ Disable auto benchmarking for the current Pry session by running | |
| 116 125 | 
             
                pry-auto_benching.rb: stopped benchmarking.
         | 
| 117 126 | 
             
                [6] pry(main)>
         | 
| 118 127 |  | 
| 119 | 
            -
            ## Accuracy
         | 
| 128 | 
            +
            ## <a id='accuracy'>Accuracy</a>
         | 
| 120 129 |  | 
| 121 130 | 
             
            pry-auto_benching.rb can measure down to 10 milliseconds (0.01 = 10 milliseconds). <br>
         | 
| 122 131 | 
             
            Benchmarking `sleep 0.01` shows no overhead in the results:
         | 
| @@ -134,12 +143,12 @@ The overhead could be considered negligible, although other Pry plugins running | |
| 134 143 | 
             
            before/after eval hooks and spending a lot of time doing that could skew results
         | 
| 135 144 | 
             
            more than is expected.
         | 
| 136 145 |  | 
| 137 | 
            -
            ##  | 
| 146 | 
            +
            ## <a id='custom-prompts'>Custom prompts</a>
         | 
| 138 147 |  | 
| 139 | 
            -
            If you want a custom prompt to integrate with pry-auto_benching.rb, it's easy,  | 
| 148 | 
            +
            If you want a custom prompt to integrate with pry-auto_benching.rb, it's easy, simply use
         | 
| 140 149 | 
             
            `pry.config.prompt_name` (by default it is equal to 'pry') somewhere in the prompt and the
         | 
| 141 150 | 
             
            duration of a benchmark will be inserted in its place, as long as `auto_benching.target_display`
         | 
| 142 | 
            -
            is set to  | 
| 151 | 
            +
            is set to `prompt`.
         | 
| 143 152 |  | 
| 144 153 | 
             
            Example:
         | 
| 145 154 |  | 
| @@ -153,10 +162,10 @@ Pry::Prompt.add( | |
| 153 162 | 
             
            end
         | 
| 154 163 | 
             
            ```
         | 
| 155 164 |  | 
| 156 | 
            -
            ## Install
         | 
| 165 | 
            +
            ## <a id='install'>Install</a>
         | 
| 157 166 |  | 
| 158 167 | 
             
                gem install pry-auto_benching.rb
         | 
| 159 168 |  | 
| 160 | 
            -
            ## License
         | 
| 169 | 
            +
            ## <a id='license'>License</a>
         | 
| 161 170 |  | 
| 162 | 
            -
            [ | 
| 171 | 
            +
            This project uses the MIT license, see [LICENSE.txt](LICENSE.txt) for details.
         | 
    
        data/pry-auto_benching.gemspec
    CHANGED
    
    | @@ -4,7 +4,7 @@ Gem::Specification.new do |spec| | |
| 4 4 | 
             
              spec.version = Pry::AutoBenching::VERSION
         | 
| 5 5 | 
             
              spec.authors = ["Robert Gleeson"]
         | 
| 6 6 | 
             
              spec.email = "trebor.g@protonmail.com"
         | 
| 7 | 
            -
              spec.summary = "Automates benchmarking  | 
| 7 | 
            +
              spec.summary = "Automates benchmarking inside the Pry REPL"
         | 
| 8 8 | 
             
              spec.description = spec.summary
         | 
| 9 9 | 
             
              spec.homepage = "https://github.com/r-obert/pry-auto_benching.rb"
         | 
| 10 10 | 
             
              spec.licenses = ["MIT"]
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pry-auto_benching.rb
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.10. | 
| 4 | 
            +
              version: 2.10.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Robert Gleeson
         | 
| @@ -24,7 +24,7 @@ dependencies: | |
| 24 24 | 
             
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 26 | 
             
                    version: '0.12'
         | 
| 27 | 
            -
            description: Automates benchmarking  | 
| 27 | 
            +
            description: Automates benchmarking inside the Pry REPL
         | 
| 28 28 | 
             
            email: trebor.g@protonmail.com
         | 
| 29 29 | 
             
            executables: []
         | 
| 30 30 | 
             
            extensions: []
         | 
| @@ -60,5 +60,5 @@ rubyforge_project: | |
| 60 60 | 
             
            rubygems_version: 2.7.7
         | 
| 61 61 | 
             
            signing_key: 
         | 
| 62 62 | 
             
            specification_version: 4
         | 
| 63 | 
            -
            summary: Automates benchmarking  | 
| 63 | 
            +
            summary: Automates benchmarking inside the Pry REPL
         | 
| 64 64 | 
             
            test_files: []
         |