hyphy 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -3
- data/Gemfile.lock +15 -10
- data/README.md +83 -1
- data/Rakefile +4 -2
- data/VERSION +1 -1
- data/hyphy.gemspec +15 -22
- data/lib/hyphy/filters/abstract_filter.rb +5 -5
- data/lib/hyphy/filters/benchmark_filter.rb +30 -0
- data/lib/hyphy/filters/duration_filter.rb +14 -5
- data/lib/hyphy/filters/limit_filter.rb +13 -0
- data/lib/hyphy/filters/sql_filter.rb +21 -0
- data/lib/hyphy/orm_adapters/abstract_orm_adapter.rb +4 -2
- data/lib/hyphy/orm_adapters/activerecord_adapter.rb +20 -2
- data/lib/hyphy/sampler.rb +29 -8
- data/lib/hyphy/sql_statement.rb +52 -0
- data/lib/hyphy.rb +5 -4
- data/spec/filters/abstract_filter_spec.rb +6 -6
- data/spec/filters/benchmark_filter_spec.rb +38 -0
- data/spec/filters/duration_filter_spec.rb +28 -16
- data/spec/filters/limit_filter_spec.rb +21 -0
- data/spec/filters/sql_filter_spec.rb +31 -0
- data/spec/models/sql_statement_spec.rb +33 -11
- data/spec/orm_adapters/activerecord_orm_adapter_spec.rb +34 -2
- data/spec/sampler_spec.rb +55 -4
- data/spec/spec_helper.rb +0 -4
- metadata +23 -51
- data/.document +0 -5
- data/lib/hyphy/database.rb +0 -3
- data/lib/hyphy/dataset.rb +0 -14
- data/lib/hyphy/dataset_collection.rb +0 -35
- data/lib/hyphy/models/sql_statement.rb +0 -49
- data/spec/dataset_collection_spec.rb +0 -38
- data/spec/dataset_spec.rb +0 -32
- data/specification.txt +0 -21
data/spec/dataset_spec.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Hyphy::Dataset do
|
4
|
-
|
5
|
-
let!(:sql_statement1) { Hyphy::SQLStatement.create(:statement => "select * from table1",
|
6
|
-
:start_time => 1.001,
|
7
|
-
:end_time => 2.002) }
|
8
|
-
|
9
|
-
let!(:sql_statement2) { Hyphy::SQLStatement.create(:statement => "select * from table2",
|
10
|
-
:start_time => 1.001,
|
11
|
-
:end_time => 3.002) }
|
12
|
-
|
13
|
-
let(:dataset) { Hyphy::Dataset.new }
|
14
|
-
|
15
|
-
describe "#get_data" do
|
16
|
-
|
17
|
-
it "stores all sql statements in the data attribute" do
|
18
|
-
dataset.data.should == [sql_statement1, sql_statement2]
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
describe "#apply_filter" do
|
24
|
-
|
25
|
-
it "filters the in memory dataset" do
|
26
|
-
dataset.apply_filter(Hyphy::DurationFilter, :duration_min => 1.5)
|
27
|
-
dataset.data.should == [sql_statement2]
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
data/specification.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
Swaggie -- A Rails performance testing framework
|
2
|
-
|
3
|
-
Requirements:
|
4
|
-
- Samples all SQL calls
|
5
|
-
- Logs length of time
|
6
|
-
- Can classify "similar" SQL statements, and nest classifications
|
7
|
-
- Provide good interface so analysis can be made
|
8
|
-
|
9
|
-
Implementation:
|
10
|
-
- Use SQLite3
|
11
|
-
- Use sequel
|
12
|
-
|
13
|
-
Todo:
|
14
|
-
- Create reports
|
15
|
-
- Save metadata from each filter
|
16
|
-
- Create way to clear database
|
17
|
-
|
18
|
-
Filters
|
19
|
-
- Nation
|
20
|
-
- Query time
|
21
|
-
- Query base
|