commit e28c324c5e73808703970b060c7511b24f5981a2 Author: Karsten Loesing karsten.loesing@gmx.net Date: Tue Apr 26 15:03:57 2011 +0200
Add log messages to database refresh function. --- db/tordir.sql | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/db/tordir.sql b/db/tordir.sql index 8b9b8ca..f01a662 100644 --- a/db/tordir.sql +++ b/db/tordir.sql @@ -848,19 +848,34 @@ CREATE TABLE gettor_stats ( -- Refresh all statistics in the database. CREATE OR REPLACE FUNCTION refresh_all() RETURNS INTEGER AS $$ BEGIN + RAISE NOTICE '% Starting refresh run.', timeofday(); + RAISE NOTICE '% Deleting old dates from updates.', timeofday(); DELETE FROM updates; + RAISE NOTICE '% Copying scheduled dates.', timeofday(); INSERT INTO updates SELECT * FROM scheduled_updates; + RAISE NOTICE '% Refreshing relay statuses per day.', timeofday(); PERFORM refresh_relay_statuses_per_day(); + RAISE NOTICE '% Refreshing network size.', timeofday(); PERFORM refresh_network_size(); + RAISE NOTICE '% Refreshing hourly network size.', timeofday(); PERFORM refresh_network_size_hour(); + RAISE NOTICE '% Refreshing relays by country.', timeofday(); PERFORM refresh_relay_countries(); + RAISE NOTICE '% Refreshing relay platforms.', timeofday(); PERFORM refresh_relay_platforms(); + RAISE NOTICE '% Refreshing relay versions.', timeofday(); PERFORM refresh_relay_versions(); + RAISE NOTICE '% Refreshing total relay bandwidth.', timeofday(); PERFORM refresh_total_bandwidth(); + RAISE NOTICE '% Refreshing relay bandwidth history.', timeofday(); PERFORM refresh_total_bwhist(); + RAISE NOTICE '% Refreshing bandwidth history by flags.', timeofday(); PERFORM refresh_bwhist_flags(); + RAISE NOTICE '% Refreshing user statistics.', timeofday(); PERFORM refresh_user_stats(); + RAISE NOTICE '% Deleting processed dates.', timeofday(); DELETE FROM scheduled_updates WHERE id IN (SELECT id FROM updates); + RAISE NOTICE '% Terminating refresh run.', timeofday(); RETURN 1; END; $$ LANGUAGE plpgsql;
tor-commits@lists.torproject.org