Skip to content
Snippets Groups Projects
Commit 5ab85726 authored by Dariusz Kędzierski's avatar Dariusz Kędzierski
Browse files

[WIP] Continued work on pyrest tests for hivemind

- updated tests bodies,
- added benchmarks for some API,

More test and benchmarks in next commit.
parent 09e4e5c0
No related branches found
No related tags found
4 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!20Dk issue 3 pyresttests
Showing
with 533 additions and 50 deletions
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
- test: - test:
- name: "Test ip address" - name: "Test ip address"
- group: "basic_smoketest" - group: "basic_smoketest"
- url: "/rpc" - url: "/"
- method: "POST" - method: "POST"
- body: '{}' - body: '{}'
---
- config:
- testset: "Hive API Benchmark Tests"
- api: &api "hive"
- variable_binds:
- api: *api
- generators:
- test_id: {type: 'number_sequence', start: 1}
- base_benchmark: &base_benchmark
- url: "/"
- group: *api
- method: "POST"
- generator_binds:
- test_id: test_id
- body: {template: {file: "./templates/request_template.json"}}
- warmup_runs: 0
- benchmark_runs: '1000'
- output_format: csv
- metrics:
- total_time
- total_time: mean
- total_time: median
- benchmark:
- name: "normalize_post"
- variable_binds:
- method: "normalize_post"
- args: {}
- <<: *base_benchmark
- benchmark:
- name: "get_post_header"
- variable_binds:
- method: "get_post_header"
- args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_benchmark
- benchmark:
- name: "get_discussion"
- variable_binds:
- method: "get_discussion"
- args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_benchmark
- benchmark:
- name: "get_post"
- variable_binds:
- method: "get_post"
- args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_benchmark
- benchmark:
- name: "get_account_posts"
- variable_binds:
- method: "get_account_posts"
- args: {"sort":"post", "account":"steemit"}
- <<: *base_benchmark
- benchmark:
- name: "get_ranked_posts"
- variable_binds:
- method: "get_ranked_posts"
- args: {"sort":"trending","tag":"","observer":"steemit"}
- <<: *base_benchmark
- benchmark:
- name: "get_profile"
- variable_binds:
- method: "get_profile"
- args: {"account":"steemit"}
- <<: *base_benchmark
- benchmark:
- name: "get_trending_topics"
- variable_binds:
- method: "get_trending_topics"
- args: {}
- <<: *base_benchmark
- benchmark:
- name: "post_notifications"
- variable_binds:
- method: "post_notifications"
- args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_benchmark
- benchmark:
- name: "account_notifications"
- variable_binds:
- method: "account_notifications"
- args: {"account":"steemit","limit":100}
- <<: *base_benchmark
- benchmark:
- name: "unread_notifications"
- variable_binds:
- method: "unread_notifications"
- args: {"account":"steemit"}
- <<: *base_benchmark
- benchmark:
- name: "get_payout_stats"
- variable_binds:
- method: "get_payout_stats"
- args: {}
- <<: *base_benchmark
- benchmark:
- name: "get_community"
- variable_binds:
- method: "get_community"
- args: {"name":"hive-123456","observer":"steemit"}
- <<: *base_benchmark
- benchmark:
- name: "get_community_context"
- variable_binds:
- method: "get_community_context"
- args: {"community":"hive-123456", "account":"steemit"}
- <<: *base_benchmark
- benchmark:
- name: "list_communities"
- variable_binds:
- method: "list_communities"
- args: {}
- <<: *base_benchmark
- benchmark:
- name: "list_pop_communities"
- variable_binds:
- method: "list_pop_communities"
- args: {}
- <<: *base_benchmark
- benchmark:
- name: "list_community_roles"
- variable_binds:
- method: "list_community_roles"
- args: {"community":"hive-123456"}
- <<: *base_benchmark
- benchmark:
- name: "list_subscribers"
- variable_binds:
- method: "list_subscribers"
- args: {"community":"hive-123456"}
- <<: *base_benchmark
- benchmark:
- name: "list_all_subscriptions"
- variable_binds:
- method: "list_all_subscriptions"
- args: {"account":"steemit"}
- <<: *base_benchmark
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- generator_binds: - generator_binds:
- test_id: test_id - test_id: test_id
- group: *api - group: *api
- url: "/rpc" - url: "/"
- method: "POST" - method: "POST"
- body: {template: {file: "../templates/request_template.json"}} - body: {template: {file: "../templates/request_template.json"}}
- validators: - validators:
...@@ -31,43 +31,42 @@ ...@@ -31,43 +31,42 @@
- name: "get_post_header" - name: "get_post_header"
- variable_binds: - variable_binds:
- method: "get_post_header" - method: "get_post_header"
- args: {} - args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussion" - name: "get_discussion"
- variable_binds: - variable_binds:
- method: "get_discussion" - method: "get_discussion"
- args: {} - args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_post" - name: "get_post"
- variable_binds: - variable_binds:
- method: "get_post" - method: "get_post"
- args: {} - args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_account_posts" - name: "get_account_posts"
- variable_binds: - variable_binds:
- method: "get_account_posts" - method: "get_account_posts"
- args: {} - args: {"sort":"post", "account":"steemit"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_ranked_posts" - name: "get_ranked_posts"
- variable_binds: - variable_binds:
- method: "get_ranked_posts" - method: "get_ranked_posts"
- args: {} - args: {"sort":"trending","tag":"","observer":"steemit"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_profile" - name: "get_profile"
- variable_binds: - variable_binds:
- method: "get_profile" - method: "get_profile"
- args: {} - args: {"account":"steemit"}
- <<: *base_test - <<: *base_test
- test: - test:
...@@ -81,21 +80,21 @@ ...@@ -81,21 +80,21 @@
- name: "post_notifications" - name: "post_notifications"
- variable_binds: - variable_binds:
- method: "post_notifications" - method: "post_notifications"
- args: {} - args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "account_notifications" - name: "account_notifications"
- variable_binds: - variable_binds:
- method: "account_notifications" - method: "account_notifications"
- args: {} - args: {"account":"steemit","limit":100}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "unread_notifications" - name: "unread_notifications"
- variable_binds: - variable_binds:
- method: "unread_notifications" - method: "unread_notifications"
- args: {} - args: {"account":"steemit"}
- <<: *base_test - <<: *base_test
- test: - test:
...@@ -109,14 +108,14 @@ ...@@ -109,14 +108,14 @@
- name: "get_community" - name: "get_community"
- variable_binds: - variable_binds:
- method: "get_community" - method: "get_community"
- args: {} - args: {"name":"hive-123456","observer":"steemit"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_community_context" - name: "get_community_context"
- variable_binds: - variable_binds:
- method: "get_community_context" - method: "get_community_context"
- args: {} - args: {"community":"hive-123456", "account":"steemit"}
- <<: *base_test - <<: *base_test
- test: - test:
...@@ -137,19 +136,19 @@ ...@@ -137,19 +136,19 @@
- name: "list_community_roles" - name: "list_community_roles"
- variable_binds: - variable_binds:
- method: "list_community_roles" - method: "list_community_roles"
- args: {} - args: {"community":"hive-123456"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "list_subscribers" - name: "list_subscribers"
- variable_binds: - variable_binds:
- method: "list_subscribers" - method: "list_subscribers"
- args: {} - args: {"community":"hive-123456"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "list_all_subscriptions" - name: "list_all_subscriptions"
- variable_binds: - variable_binds:
- method: "list_all_subscriptions" - method: "list_all_subscriptions"
- args: {} - args: {"account":"steemit"}
- <<: *base_test - <<: *base_test
\ No newline at end of file
---
- config:
- testset: "Hive API Benchmark Tests"
- api: &api "hive"
- variable_binds:
- api: *api
- generators:
- test_id: {type: 'number_sequence', start: 1}
- base_benchmark: &base_benchmark
- url: "/"
- group: *api
- method: "POST"
- generator_binds:
- test_id: test_id
- body: {template: {file: "./templates/request_template.json"}}
- warmup_runs: 0
- benchmark_runs: '1000'
- output_format: csv
- metrics:
- total_time
- total_time: mean
- total_time: median
- benchmark:
- name: "get_followers"
- variable_binds:
- method: "get_followers"
- args: {"account":"steemit","start":null,"type":"blog","limit":10}
- <<: *base_benchmark
- benchmark:
- name: "get_following"
- variable_binds:
- method: "get_following"
- args: {"account":"steemit","start":null,"type":"blog","limit":10}
- <<: *base_benchmark
- benchmark:
- name: "get_follow_count"
- variable_binds:
- method: "get_follow_count"
- args: {"account":"steemit"}
- <<: *base_benchmark
- benchmark:
- name: "get_content"
- variable_binds:
- method: "get_content"
- args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_benchmark
- benchmark:
- name: "get_content_replies"
- variable_binds:
- method: "get_content_replies"
- args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_benchmark
- benchmark:
- name: "get_state"
- variable_binds:
- method: "get_state"
- args: {}
- <<: *base_benchmark
- benchmark:
- name: "get_trending_tags"
- variable_binds:
- method: "get_trending_tags"
- args: {"start_tag":"steem","limit":10}
- <<: *base_benchmark
- benchmark:
- name: "get_discussions_by_trending"
- variable_binds:
- method: "get_discussions_by_trending"
- args: {"tag":"steem","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_discussions_by_hot"
- variable_binds:
- method: "get_discussions_by_hot"
- args: {"tag":"steem","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_discussions_by_promoted"
- variable_binds:
- method: "get_discussions_by_promoted"
- args: {"tag":"steem","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_discussions_by_created"
- variable_binds:
- method: "get_discussions_by_created"
- args: {"tag":"steem","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_discussions_by_blog"
- variable_binds:
- method: "get_discussions_by_blog"
- args: {"tag":"steemit","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_discussions_by_feed"
- variable_binds:
- method: "get_discussions_by_feed"
- args: {"tag":"steem","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_discussions_by_comments"
- variable_binds:
- method: "get_discussions_by_comments"
- args: {"start_author":"steemit","start_permlink":"firstpost","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_replies_by_last_update"
- variable_binds:
- method: "get_replies_by_last_update"
- args: {"start_parent_author":"steemit","start_permlink":"firstpost","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_discussions_by_author_before_date"
- variable_binds:
- method: "get_discussions_by_author_before_date"
- args: {"author":"steemit","start_permlink":"firstpost","before_date":"2016-04-19T22:49:43","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_post_discussions_by_payout"
- variable_binds:
- method: "get_post_discussions_by_payout"
- args: {"tag":"steem","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_comment_discussions_by_payout"
- variable_binds:
- method: "get_comment_discussions_by_payout"
- args: {"tag":"steem","limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_blog"
- variable_binds:
- method: "get_blog"
- args: {"account":"steemit","start_entry_id":0,"limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_blog_entries"
- variable_binds:
- method: "get_blog_entries"
- args: {"account":"steemit","start_entry_id":0,"limit":1}
- <<: *base_benchmark
- benchmark:
- name: "get_account_reputations"
- variable_binds:
- method: "get_account_reputations"
- args: {"account_lower_bound": "steem"}
- <<: *base_benchmark
- benchmark:
- name: "get_reblogged_by"
- variable_binds:
- method: "get_reblogged_by"
- args: {"author":"steemit","permlink":"firstpost"}
- <<: *base_benchmark
- benchmark:
- name: "get_accounts"
- variable_binds:
- method: "get_accounts"
- args: {["steemit"]}
- <<: *base_benchmark
- benchmark:
- name: "get_account_votes"
- variable_binds:
- method: "get_account_votes"
- args: {["steemit"]}
- <<: *base_benchmark
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- generator_binds: - generator_binds:
- test_id: test_id - test_id: test_id
- group: *api - group: *api
- url: "/rpc" - url: "/"
- method: "POST" - method: "POST"
- body: {template: {file: "../templates/request_template.json"}} - body: {template: {file: "../templates/request_template.json"}}
- validators: - validators:
...@@ -24,35 +24,35 @@ ...@@ -24,35 +24,35 @@
- name: "get_followers" - name: "get_followers"
- variable_binds: - variable_binds:
- method: "get_followers" - method: "get_followers"
- args: {} - args: {"account":"steemit","start":null,"type":"blog","limit":10}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_following" - name: "get_following"
- variable_binds: - variable_binds:
- method: "get_following" - method: "get_following"
- args: {} - args: {"account":"steemit","start":null,"type":"blog","limit":10}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_follow_count" - name: "get_follow_count"
- variable_binds: - variable_binds:
- method: "get_follow_count" - method: "get_follow_count"
- args: {} - args: {"account":"steemit"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_content" - name: "get_content"
- variable_binds: - variable_binds:
- method: "get_content" - method: "get_content"
- args: {} - args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_content_replies" - name: "get_content_replies"
- variable_binds: - variable_binds:
- method: "get_content_replies" - method: "get_content_replies"
- args: {} - args: {"author":"steemit", "permlink":"firstpost"}
- <<: *base_test - <<: *base_test
- test: - test:
...@@ -66,124 +66,124 @@ ...@@ -66,124 +66,124 @@
- name: "get_trending_tags" - name: "get_trending_tags"
- variable_binds: - variable_binds:
- method: "get_trending_tags" - method: "get_trending_tags"
- args: {} - args: {"start_tag":"steem","limit":10}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussions_by_trending" - name: "get_discussions_by_trending"
- variable_binds: - variable_binds:
- method: "get_discussions_by_trending" - method: "get_discussions_by_trending"
- args: {} - args: {"tag":"steem","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussions_by_hot" - name: "get_discussions_by_hot"
- variable_binds: - variable_binds:
- method: "get_discussions_by_hot" - method: "get_discussions_by_hot"
- args: {} - args: {"tag":"steem","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussions_by_promoted" - name: "get_discussions_by_promoted"
- variable_binds: - variable_binds:
- method: "get_discussions_by_promoted" - method: "get_discussions_by_promoted"
- args: {} - args: {"tag":"steem","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussions_by_created" - name: "get_discussions_by_created"
- variable_binds: - variable_binds:
- method: "get_discussions_by_created" - method: "get_discussions_by_created"
- args: {} - args: {"tag":"steem","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussions_by_blog" - name: "get_discussions_by_blog"
- variable_binds: - variable_binds:
- method: "get_discussions_by_blog" - method: "get_discussions_by_blog"
- args: {} - args: {"tag":"steemit","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussions_by_feed" - name: "get_discussions_by_feed"
- variable_binds: - variable_binds:
- method: "get_discussions_by_feed" - method: "get_discussions_by_feed"
- args: {} - args: {"tag":"steem","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussions_by_comments" - name: "get_discussions_by_comments"
- variable_binds: - variable_binds:
- method: "get_discussions_by_comments" - method: "get_discussions_by_comments"
- args: {} - args: {"start_author":"steemit","start_permlink":"firstpost","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_replies_by_last_update" - name: "get_replies_by_last_update"
- variable_binds: - variable_binds:
- method: "get_replies_by_last_update" - method: "get_replies_by_last_update"
- args: {} - args: {"start_parent_author":"steemit","start_permlink":"firstpost","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_discussions_by_author_before_date" - name: "get_discussions_by_author_before_date"
- variable_binds: - variable_binds:
- method: "get_discussions_by_author_before_date" - method: "get_discussions_by_author_before_date"
- args: {} - args: {"author":"steemit","start_permlink":"firstpost","before_date":"2016-04-19T22:49:43","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_post_discussions_by_payout" - name: "get_post_discussions_by_payout"
- variable_binds: - variable_binds:
- method: "get_post_discussions_by_payout" - method: "get_post_discussions_by_payout"
- args: {} - args: {"tag":"steem","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_comment_discussions_by_payout" - name: "get_comment_discussions_by_payout"
- variable_binds: - variable_binds:
- method: "get_comment_discussions_by_payout" - method: "get_comment_discussions_by_payout"
- args: {} - args: {"tag":"steem","limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_blog" - name: "get_blog"
- variable_binds: - variable_binds:
- method: "get_blog" - method: "get_blog"
- args: {} - args: {"account":"steemit","start_entry_id":0,"limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_blog_entries" - name: "get_blog_entries"
- variable_binds: - variable_binds:
- method: "get_blog_entries" - method: "get_blog_entries"
- args: {} - args: {"account":"steemit","start_entry_id":0,"limit":1}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_account_reputations" - name: "get_account_reputations"
- variable_binds: - variable_binds:
- method: "get_account_reputations" - method: "get_account_reputations"
- args: {} - args: {"account_lower_bound": "steem"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_reblogged_by" - name: "get_reblogged_by"
- variable_binds: - variable_binds:
- method: "get_reblogged_by" - method: "get_reblogged_by"
- args: {} - args: {"author":"steemit","permlink":"firstpost"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_accounts" - name: "get_accounts"
- variable_binds: - variable_binds:
- method: "get_accounts" - method: "get_accounts"
- args: {} - args: {["steemit"]}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "get_account_votes" - name: "get_account_votes"
- variable_binds: - variable_binds:
- method: "get_account_votes" - method: "get_account_votes"
- args: {} - args: {["steemit"]}
- <<: *base_test - <<: *base_test
\ No newline at end of file
---
- config:
- testset: "Hive API Benchmark Tests"
- api: &api "hive"
- variable_binds:
- api: *api
- generators:
- test_id: {type: 'number_sequence', start: 1}
- base_benchmark: &base_benchmark
- url: "/"
- group: *api
- method: "POST"
- generator_binds:
- test_id: test_id
- body: {template: {file: "./templates/request_template.json"}}
- warmup_runs: 0
- benchmark_runs: '1000'
- output_format: csv
- metrics:
- total_time
- total_time: mean
- total_time: median
- benchmark:
- name: "list_comments"
- variable_binds:
- method: "list_comments"
- args: {"start":["steemit","firstpost","",""], "limit":10, "order":"by_permlink"}
- <<: *base_benchmark
- benchmark:
- name: "find_comments"
- variable_binds:
- method: "find_comments"
- args: {"start":[["steemit","firstpost"],["steemit","firstpost"]], "limit":10, "order":"by_account"}
- <<: *base_benchmark
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- generator_binds: - generator_binds:
- test_id: test_id - test_id: test_id
- group: *api - group: *api
- url: "/rpc" - url: "/"
- method: "POST" - method: "POST"
- body: {template: {file: "../templates/request_template.json"}} - body: {template: {file: "../templates/request_template.json"}}
- validators: - validators:
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
- name: "list_comments" - name: "list_comments"
- variable_binds: - variable_binds:
- method: "list_comments" - method: "list_comments"
- args: {} - args: {"start":["steemit","firstpost","",""], "limit":10, "order":"by_permlink"}
- <<: *base_test - <<: *base_test
- test: - test:
- name: "find_comments" - name: "find_comments"
- variable_binds: - variable_binds:
- method: "find_comments" - method: "find_comments"
- args: {} - args: {"start":[["steemit","firstpost"],["steemit","firstpost"]], "limit":10, "order":"by_account"}
- <<: *base_test - <<: *base_test
---
- config:
- testset: "Hive API Benchmark Tests"
- api: &api "hive"
- variable_binds:
- api: *api
- generators:
- test_id: {type: 'number_sequence', start: 1}
- base_benchmark: &base_benchmark
- url: "/"
- group: *api
- method: "POST"
- generator_binds:
- test_id: test_id
- body: {template: {file: "./templates/request_template.json"}}
- warmup_runs: 0
- benchmark_runs: '1000'
- output_format: csv
- metrics:
- total_time
- total_time: mean
- total_time: median
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- generator_binds: - generator_binds:
- test_id: test_id - test_id: test_id
- group: *api - group: *api
- url: "/rpc" - url: "/"
- method: "POST" - method: "POST"
- body: {template: {file: "../templates/request_template.json"}} - body: {template: {file: "../templates/request_template.json"}}
- validators: - validators:
......
---
- config:
- testset: "Hive API Benchmark Tests"
- api: &api "hive"
- variable_binds:
- api: *api
- generators:
- test_id: {type: 'number_sequence', start: 1}
- base_benchmark: &base_benchmark
- url: "/"
- group: *api
- method: "POST"
- generator_binds:
- test_id: test_id
- body: {template: {file: "./templates/request_template.json"}}
- warmup_runs: 0
- benchmark_runs: '1000'
- output_format: csv
- metrics:
- total_time
- total_time: mean
- total_time: median
- benchmark:
- name: "db_head_state"
- variable_binds:
- method: "db_head_state"
- args: {}
- <<: *base_benchmark
...@@ -11,18 +11,20 @@ ...@@ -11,18 +11,20 @@
- generator_binds: - generator_binds:
- test_id: test_id - test_id: test_id
- group: *api - group: *api
- url: "/rpc" - url: "/"
- method: "POST" - method: "POST"
- body: {template: {file: "../templates/request_template.json"}} - body: {template: {file: "../templates/request_template.json"}}
- validators: - validators:
- extract_test: {jsonpath_mini: "error", test: "not_exists"} - extract_test: {jsonpath_mini: "error", test: "not_exists"}
- extract_test: {jsonpath_mini: "result", test: "exists"} - extract_test: {jsonpath_mini: "result", test: "exists"}
- extract_test: {jsonpath_mini: "result.db_head_block", test: "exists"}
- extract_test: {jsonpath_mini: "result.db_head_time", test: "exists"}
- extract_test: {jsonpath_mini: "result.db_head_age", test: "exists"}
- compare: {jsonpath_mini: "id", comparator: "str_eq", expected: {template: $test_id}} - compare: {jsonpath_mini: "id", comparator: "str_eq", expected: {template: $test_id}}
- json_file_validator: {jsonpath_mini: "result", comparator: "json_compare", expected: {template: '$api/$method'}}
- test: - test:
- name: "db_head_state" - name: "db_head_state"
- variable_binds: - variable_binds:
- method: "db_head_state" - method: "db_head_state"
- args: {} - args: {}
- <<: *base_test - <<: *base_test
\ No newline at end of file
...@@ -16,7 +16,7 @@ else ...@@ -16,7 +16,7 @@ else
fi fi
echo COMPARATOR: $COMPARATOR echo COMPARATOR: $COMPARATOR
echo "Running API tests\n"
pyresttest $NODE:$RPC_PORT ./basic_smoketest.yaml pyresttest $NODE:$RPC_PORT ./basic_smoketest.yaml
[ $? -ne 0 ] && echo FATAL: hivemind not running? && exit -1 [ $? -ne 0 ] && echo FATAL: hivemind not running? && exit -1
...@@ -37,5 +37,26 @@ pyresttest $NODE:$RPC_PORT ./hive_api/hive_api_test.yaml --import_extensions='va ...@@ -37,5 +37,26 @@ pyresttest $NODE:$RPC_PORT ./hive_api/hive_api_test.yaml --import_extensions='va
pyresttest $NODE:$RPC_PORT ./tags_api/tags_api_test.yaml --import_extensions='validator_ex;'$COMPARATOR pyresttest $NODE:$RPC_PORT ./tags_api/tags_api_test.yaml --import_extensions='validator_ex;'$COMPARATOR
[ $? -ne 0 ] && EXIT_CODE=-1 [ $? -ne 0 ] && EXIT_CODE=-1
echo "Done!\n"
echo "Running API benchmark tests\n"
pyresttest $NODE:$RPC_PORT ./bridge_api/bridge_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR
[ $? -ne 0 ] && EXIT_CODE=-1
pyresttest $NODE:$RPC_PORT ./condenser_api/condenser_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR
[ $? -ne 0 ] && EXIT_CODE=-1
pyresttest $NODE:$RPC_PORT ./database_api/database_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR
[ $? -ne 0 ] && EXIT_CODE=-1
pyresttest $NODE:$RPC_PORT ./follow_api/follow_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR
[ $? -ne 0 ] && EXIT_CODE=-1
pyresttest $NODE:$RPC_PORT ./hive_api/hive_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR
[ $? -ne 0 ] && EXIT_CODE=-1
pyresttest $NODE:$RPC_PORT ./tags_api/tags_api_benchmark.yaml --import_extensions='validator_ex;'$COMPARATOR
[ $? -ne 0 ] && EXIT_CODE=-1
echo "Done!\n"
exit $EXIT_CODE exit $EXIT_CODE
---
- config:
- testset: "Hive API Benchmark Tests"
- api: &api "hive"
- variable_binds:
- api: *api
- generators:
- test_id: {type: 'number_sequence', start: 1}
- base_benchmark: &base_benchmark
- url: "/"
- group: *api
- method: "POST"
- generator_binds:
- test_id: test_id
- body: {template: {file: "./templates/request_template.json"}}
- warmup_runs: 0
- benchmark_runs: '1000'
- output_format: csv
- metrics:
- total_time
- total_time: mean
- total_time: median
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- generator_binds: - generator_binds:
- test_id: test_id - test_id: test_id
- group: *api - group: *api
- url: "/rpc" - url: "/"
- method: "POST" - method: "POST"
- body: {template: {file: "../templates/request_template.json"}} - body: {template: {file: "../templates/request_template.json"}}
- validators: - validators:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment