Skip to content

Commit

Permalink
Merge pull request #4 from talbright/fix-parser-wilcards
Browse files Browse the repository at this point in the history
Add to list of valid chars in path_segment
  • Loading branch information
talbright committed Jun 6, 2014
2 parents 176cbcd + dc61680 commit 589ed95
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/graphite/target_grammer.treetop
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ grammar TargetGrammer
end

rule path_segment
[a-zA-Z0-9_\*\-]+ <Graphite::TargetGrammer::PathSegment>
[a-zA-Z0-9_\[\]\{\}\*\-]+ <Graphite::TargetGrammer::PathSegment>
end

rule comment
Expand Down
1 change: 1 addition & 0 deletions spec/data/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -596,3 +596,4 @@
- alias(transformNull(smartSummarize(stats_counts.merchant_center.jobs.roi.watson.watson_consumer_connect_mail_stats.updated, "10min", "sum")), "changed")
- alias(hitcount(stats.monocle.indexer.deals.update.start,"10min"), "deals updates in 10 min period")
- alias(stats.monocle.indexer.deals.update.start, "drawAsInfinite(update)")
- averageSeriesWithWildcards(host.cpu-[0-7].cpu-{user,system}.value, 1)
6 changes: 5 additions & 1 deletion spec/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20131106162900) do
ActiveRecord::Schema.define(version: 20140106161202) do

create_table "applications", force: true do |t|
t.integer "user_id"
Expand All @@ -33,6 +33,8 @@
t.text "data", limit: 2147483647, null: false
end

add_index "job_data", ["job_id"], name: "index_job_data_on_job_id", using: :btree

create_table "job_errors", force: true do |t|
t.integer "job_id"
t.datetime "created_at"
Expand All @@ -43,6 +45,7 @@
end

add_index "job_errors", ["job_id"], name: "job_id", using: :btree
add_index "job_errors", ["status"], name: "index_job_errors_on_status", using: :btree

create_table "jobs", force: true do |t|
t.datetime "created_at"
Expand All @@ -67,6 +70,7 @@

add_index "jobs", ["app_id"], name: "app_id", using: :btree
add_index "jobs", ["id", "name"], name: "id_name_version_key", unique: true, using: :btree
add_index "jobs", ["status"], name: "index_jobs_on_status", using: :btree
add_index "jobs", ["user_id"], name: "jobs_ibfk_1", using: :btree

create_table "users", force: true do |t|
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/graphite/target_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

context 'expression' do
context 'is parseable' do
it 'for all values in metrics.yml' do
it 'using comprehensive list of metrics in metrics.yml' do
metrics = YAML.load_file("spec/data/metrics.yml")
parser = Graphite::TargetParser.new
metrics.each do |m|
Expand Down

0 comments on commit 589ed95

Please sign in to comment.