Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
b316c9a5
Commit
b316c9a5
authored
Aug 18, 2012
by
dementrock
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'benchmark' of github.com:rll/cs_comments_service into benchmark
parents
14c29bf8
ce1c0d96
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/tasks/benchmark.rake
+4
-4
No files found.
lib/tasks/benchmark.rake
View file @
b316c9a5
...
@@ -80,15 +80,15 @@ namespace :benchmark do
...
@@ -80,15 +80,15 @@ namespace :benchmark do
x
.
report
(
"querying threads in a course"
)
do
x
.
report
(
"querying threads in a course"
)
do
COURSE_THREAD_QUERY
.
times
do
(
1
..
COURSE_THREAD_QUERY
).
each
do
|
seed
|
query_params
=
{
course_id:
"1"
,
sort_key:
sort_keys
.
sample
,
sort_order:
sort_order
,
page:
1
+
rand
(
100
)
,
per_page:
5
}
query_params
=
{
course_id:
"1"
,
sort_key:
sort_keys
[
seed
%
4
],
sort_order:
sort_order
,
page:
seed
%
5
+
1
,
per_page:
5
}
RestClient
.
get
"
#{
PREFIX
}
/threads"
,
params:
query_params
RestClient
.
get
"
#{
PREFIX
}
/threads"
,
params:
query_params
end
end
end
end
x
.
report
(
"searching threads in a course"
)
do
x
.
report
(
"searching threads in a course"
)
do
COURSE_THREAD_QUERY
.
times
do
(
1
..
COURSE_THREAD_QUERY
).
each
do
|
seed
|
query_params
=
{
course_id:
"1"
,
text:
"token
#{
rand
(
10
)
}
token
#{
rand
(
10
)
}
"
,
sort_key:
sort_keys
.
sample
,
sort_order:
sort_order
,
page:
1
+
rand
(
10
)
,
per_page:
5
}
query_params
=
{
course_id:
"1"
,
text:
"token
#{
seed
%
10
}
token
#{
(
seed
*
seed
)
%
10
}
"
,
sort_key:
sort_keys
[
seed
%
4
],
sort_order:
sort_order
,
page:
seed
%
5
+
1
,
per_page:
5
}
RestClient
.
get
"
#{
PREFIX
}
/search/threads"
,
params:
query_params
RestClient
.
get
"
#{
PREFIX
}
/search/threads"
,
params:
query_params
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment