Commit eac76acd authored by Mark Jordan's avatar Mark Jordan
Browse files

Updated README.

parent 8ebe1657
......@@ -6,7 +6,7 @@ This module is for development purposes only. Do not use it on a production Isla
## Overview
Drush script to randomize the timestamp and IP address of entries in the `islandora_usage_stats_object_access_log` table. The principle use of this script is to simulate the traffic to a public-facing Islandora for development and testing purposes.
Drush script to randomize the timestamp and IP address of entries in the `islandora_usage_stats_object_access_log` table. The principle use of this script is to simulate the traffic to a public-facing Islandora for development and testing purposes. It does this by hitting an object's URL with an HTTP request and then updating the resulting row in the `islandora_usage_stats_object_access_log` table with a random timestamp and random IP address.
## Dependencies
......@@ -23,7 +23,7 @@ To add test data, run:
`drush islandora_usage_stats_generate_test_access_data_add --pids=islandora:100 --updated_db_ids_file=/tmp/foo.txt --number_hits=5`
will output the following:
You will see the following output:
```
Hitting http://localhost:8000/islandora/object/islandora:100 5 times
......@@ -33,7 +33,7 @@ Row 1231 in the islandora_usage_stats_object_access_log table now uses 150472614
Row 1232 in the islandora_usage_stats_object_access_log table now uses 1497229949 and 207.109.114.78
Row 1233 in the islandora_usage_stats_object_access_log table now uses 1525721306 and 137.60.72.70
```
with the database table looking like this:
Inspecting the `islandora_usage_stats_object_access_log` table will show:
```
mysql> select * from islandora_usage_stats_object_access_log;
......@@ -48,12 +48,16 @@ mysql> select * from islandora_usage_stats_object_access_log;
+------+--------+------------+-----------------+-----+
```
It does this by hitting an object's URL with an HTTP request and then updating the resulting row in the `islandora_usage_stats_object_access_log` table with a random timestamp and random IP address.
This data is now available for your testing and development purposes.
### Removing your test data
You can remove the rows in `islandora_usage_stats_object_access_log` that contain test data by running the following:
`drush islandora_usage_stats_generate_test_access_data_delete --updated_db_ids_file=/tmp/foo.txt`
The file, which is written when the data is generated, contains one `id` value per row. You can also delete the data manually using queries like `delete from islandora_usage_stats_object_access_log where id > 1228`.
## Maintainer
* [Mark Jordan](https://github.com/mjordan)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment