1 |
efrain |
1 |
@core @core_cache
|
|
|
2 |
Feature: Display usage information for cache
|
|
|
3 |
In order to investigate performance problems with caching
|
|
|
4 |
As an administrator
|
|
|
5 |
I need to be able to monitor the size of items in the cache
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname |
|
|
|
10 |
| Course 1 | C1 |
|
|
|
11 |
|
|
|
12 |
Scenario: Cache performance info displays
|
|
|
13 |
When I am on the "C1" "Course" page logged in as "admin"
|
|
|
14 |
And I navigate to "Plugins > Caching > Cache usage" in site administration
|
|
|
15 |
|
|
|
16 |
# Check one row of the summary table. The actual total is currently 3.6MB so it's likely to
|
|
|
17 |
# continue to be in the MB range.
|
|
|
18 |
Then "default_application" row "Plugin" column of "usage_summary" table should contain "cachestore_file"
|
|
|
19 |
And "default_application" row "Estimated total" column of "usage_summary" table should contain "MB"
|
|
|
20 |
And "default_application" row "Actual usage (if known)" column of "usage_summary" table should contain "MB"
|
|
|
21 |
|
|
|
22 |
# And one row of the main table. The totals are fixed to use the MB unit.
|
|
|
23 |
And "core/config" row "Store name" column of "usage_main" table should contain "default_application"
|
|
|
24 |
And "core/config" row "Plugin" column of "usage_main" table should contain "cachestore_file"
|
|
|
25 |
And "core/config" row "Estimated total" column of "usage_main" table should contain "MB"
|
|
|
26 |
|
|
|
27 |
Scenario: Sample option works
|
|
|
28 |
When I am on the "C1" "Course" page logged in as "admin"
|
|
|
29 |
And I navigate to "Plugins > Caching > Cache usage" in site administration
|
|
|
30 |
And I set the field "samples" to "1000"
|
|
|
31 |
And I press "Update"
|
|
|
32 |
|
|
|
33 |
Then the field "samples" matches value "1000"
|
|
|
34 |
And "usage_summary" "table" should exist
|
|
|
35 |
And "usage_main" "table" should exist
|