# Railsbench can't parse benchmarks.yml correctly

**URL:** <https://www.ruby-forum.com/t/railsbench-cant-parse-benchmarks-yml-correctly/137321>\
**Category:** Rails\
**Created:** [May 12, 2008, 12:45am UTC](https://www.ruby-forum.com/t/railsbench-cant-parse-benchmarks-yml-correctly/137321 "2008-05-12T00:45:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfrankov](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@jfrankov](https://www.ruby-forum.com/u/jfrankov)\
**Post date:** [May 12, 2008, 12:45am UTC](https://www.ruby-forum.com/t/railsbench-cant-parse-benchmarks-yml-correctly/137321/1 "2008-05-12T00:45:53Z")

</div>

Apologies in advance for the lengthy/somewhat dry (not DRY) post, but  
this is a real frustrating problem here, so I’d love some help:

I installed the railsbench gem, and set up my benchmarks.yml file just  
like it said:

default:  
index

index:  
uri: /test/index  
new\_session: true

When I run “railsbench perf\_run 5” it works fine. But I want to test  
1000 URLs, so as the docs suggested I changed benchmarks.yml to this:

default:  
index, other

index:  
uri: /test/index  
new\_session: true

## other:

```
uri: /test/list

```

- uri: /test/alphabetic  
new\_session: true

But this format doesn’t work. When I run “railsbench perf\_run 5” it  
gives this error:

/usr/lib/ruby/gems/1.8/gems/railsbench-0.9.2/lib/railsbench/  
benchmark\_specs.rb:41:in `parse’: oops: unknown entry type in  
benchmark specification (RuntimeError)

I thought maybe the dashes in the YAML were wrong, so I changed them  
to this:

other:  
foo:  
uri: /test/list  
bar:  
uri: /test/alphabetic  
new\_session: true

But that gives this error:

No uri given for benchmark entry: BenchmarkSpec(other,  
{“foo”=\>{“uri”=\>"/test/list"}, “bar”=\>{“new\_session”=\>true, “uri”=\>"/  
test/alphabetic"}})

Turns out it only works if the objects are not “nested” under the  
object named “other”:

foo:  
uri: /test/list  
bar:  
uri: /test/alphabetic  
new\_session: true

…but this is really clunky because then I have to have to list each  
yaml object in my default set at the top of the file:

default:  
index, foo, bar, … etc

And it seems weird to list all 1000 of the urls I want to benchmark on  
that one line.

Two questions:

1. Any idea why I’m getting these errors when I’m following the  
example docs exactly?
2. How many URLs should one benchmark? I wanted to use 1000 to  
exercise different paths through my code, but maybe that’s not what  
railsbench is for.

Any tips or advice would be great. Thanks!

-Jason
