evanphx / benchmark-ips

Provides iteration per second benchmarking for Ruby
MIT License
1.72k stars 97 forks source link

Ignore empty saved files #98

Closed jcoleman closed 4 years ago

jcoleman commented 4 years ago

The current code fails if a save file is specified and already exists on disk but is empty. That makes it harder to script using temp files, since you'd generally want to pre-create the temp file.

While it's possible to workaround this by writing "[]" to the file ahead of time, you essentially need to read the code to realize that's why you're getting a "NoMethodError each on nil" exception, so it seems better to just handle this up front.

jcoleman commented 4 years ago

Looks like CI is broken generally:

$ rvm use 1.9.2 --install --binary --fuzzy
181curl: (22) The requested URL returned error: 404 Not Found
182Required ruby-1.9.2 is not installed - installing.
183curl: (22) The requested URL returned error: 404 Not Found
184Searching for binary rubies, this might take some time.
185Requested binary installation but no rubies are available to download, consider skipping --binary flag.
186Gemset '' does not exist, 'rvm ruby-1.9.2 do rvm gemset create ' first, or append '--create'.
187The command "rvm use 1.9.2 --install --binary --fuzzy" failed and exited with 2 during .
nateberkopec commented 4 years ago

CI should be better now, you should rebase

nateberkopec commented 4 years ago

Thanks @jcoleman !