Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #823 from jberkus/master
Changes to crashes_by_user and product_crash_ratio resolve bug 790844
- Loading branch information
Showing
20 changed files
with
709 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
CREATE OR REPLACE VIEW crashes_by_user_build_view AS | ||
SELECT crashes_by_user_build.product_version_id, | ||
product_versions.product_name, version_string, | ||
os_short_name, os_name, crash_type, crash_type_short, | ||
crashes_by_user_build.build_date, | ||
sum(report_count) as report_count, | ||
sum(report_count / throttle) as adjusted_report_count, | ||
sum(adu) as adu, throttle | ||
FROM crashes_by_user_build | ||
JOIN product_versions USING (product_version_id) | ||
JOIN product_release_channels ON | ||
product_versions.product_name = product_release_channels.product_name | ||
AND product_versions.build_type = product_release_channels.release_channel | ||
JOIN os_names USING (os_short_name) | ||
JOIN crash_types USING (crash_type_id) | ||
GROUP BY crashes_by_user_build.product_version_id, | ||
product_versions.product_name, version_string, | ||
os_short_name, os_name, crash_type, crash_type_short, | ||
crashes_by_user_build.build_date, throttle; | ||
|
||
ALTER VIEW crashes_by_user_build_view OWNER TO breakpad_rw; | ||
|
||
CREATE OR REPLACE VIEW crashes_by_user_view AS | ||
SELECT crashes_by_user.product_version_id, | ||
product_versions.product_name, version_string, | ||
os_short_name, os_name, crash_type, crash_type_short, report_date, | ||
report_count, (report_count / throttle) as adjusted_report_count, | ||
adu, throttle | ||
FROM crashes_by_user | ||
JOIN product_versions USING (product_version_id) | ||
JOIN product_release_channels ON | ||
product_versions.product_name = product_release_channels.product_name | ||
AND product_versions.build_type = product_release_channels.release_channel | ||
JOIN os_names USING (os_short_name) | ||
JOIN crash_types USING (crash_type_id); | ||
|
||
ALTER VIEW crashes_by_user_view OWNER TO breakpad_rw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
|
||
CREATE OR REPLACE VIEW current_server_status AS | ||
SELECT server_status.date_recently_completed, server_status.date_oldest_job_queued, date_part('epoch'::text, (server_status.date_created - server_status.date_oldest_job_queued)) AS oldest_job_age, server_status.avg_process_sec, server_status.avg_wait_sec, server_status.waiting_job_count, server_status.processors_count, server_status.date_created FROM server_status ORDER BY server_status.date_created DESC LIMIT 1; | ||
|
||
|
||
ALTER TABLE public.current_server_status OWNER TO breakpad_rw; | ||
|
||
REVOKE ALL ON TABLE current_server_status FROM PUBLIC; | ||
REVOKE ALL ON TABLE current_server_status FROM breakpad_rw; | ||
GRANT ALL ON TABLE current_server_status TO breakpad_rw; | ||
GRANT SELECT ON TABLE current_server_status TO monitoring; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
CREATE VIEW default_versions AS | ||
SELECT count_versions.product_name, count_versions.version_string, count_versions.product_version_id FROM (SELECT product_info.product_name, product_info.version_string, product_info.product_version_id, row_number() OVER (PARTITION BY product_info.product_name ORDER BY ((('now'::text)::date >= product_info.start_date) AND (('now'::text)::date <= product_info.end_date)) DESC, product_info.is_featured DESC, product_info.channel_sort DESC) AS sort_count FROM product_info) count_versions WHERE (count_versions.sort_count = 1); | ||
|
||
|
||
ALTER TABLE public.default_versions OWNER TO breakpad_rw; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
|
||
CREATE OR REPLACE VIEW default_versions_builds AS | ||
SELECT count_versions.product_name, count_versions.version_string, count_versions.product_version_id FROM (SELECT product_info.product_name, product_info.version_string, product_info.product_version_id, row_number() OVER (PARTITION BY product_info.product_name ORDER BY ((('now'::text)::date >= product_info.start_date) AND (('now'::text)::date <= product_info.end_date)) DESC, product_info.is_featured DESC, product_info.channel_sort DESC) AS sort_count FROM product_info WHERE product_info.has_builds) count_versions WHERE (count_versions.sort_count = 1); | ||
|
||
|
||
ALTER TABLE public.default_versions_builds OWNER TO breakpad_rw; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,16 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
|
||
CREATE OR REPLACE VIEW hang_report | ||
AS | ||
SELECT | ||
product_name AS product, | ||
version_string AS version, | ||
browser_signatures.signature AS browser_signature, | ||
plugin_signatures.signature AS plugin_signature, | ||
hang_id AS browser_hangid, | ||
flash_version, | ||
url, | ||
uuid, | ||
duplicates, | ||
report_date as report_day | ||
FROM daily_hangs | ||
JOIN product_versions USING (product_version_id) | ||
JOIN signatures as browser_signatures ON browser_signature_id = browser_signatures.signature_id | ||
JOIN signatures AS plugin_signatures ON plugin_signature_id = plugin_signatures.signature_id | ||
LEFT OUTER JOIN flash_versions USING (flash_version_id); | ||
CREATE OR REPLACE VIEW hang_report AS | ||
SELECT product_versions.product_name AS product, product_versions.version_string AS version, browser_signatures.signature AS browser_signature, plugin_signatures.signature AS plugin_signature, daily_hangs.hang_id AS browser_hangid, flash_versions.flash_version, daily_hangs.url, daily_hangs.uuid, daily_hangs.duplicates, daily_hangs.report_date AS report_day FROM ((((daily_hangs JOIN product_versions USING (product_version_id)) JOIN signatures browser_signatures ON ((daily_hangs.browser_signature_id = browser_signatures.signature_id))) JOIN signatures plugin_signatures ON ((daily_hangs.plugin_signature_id = plugin_signatures.signature_id))) LEFT JOIN flash_versions USING (flash_version_id)); | ||
|
||
ALTER VIEW hang_report OWNER TO breakpad_rw; | ||
|
||
ALTER TABLE public.hang_report OWNER TO breakpad_rw; | ||
|
||
REVOKE ALL ON TABLE hang_report FROM PUBLIC; | ||
REVOKE ALL ON TABLE hang_report FROM breakpad_rw; | ||
GRANT ALL ON TABLE hang_report TO breakpad_rw; | ||
GRANT SELECT ON TABLE hang_report TO breakpad; | ||
GRANT SELECT ON TABLE hang_report TO breakpad_ro; | ||
GRANT ALL ON TABLE hang_report TO monitor; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
CREATE OR REPLACE VIEW home_page_graph_view | ||
AS | ||
SELECT product_version_id, | ||
product_name, | ||
version_string, | ||
report_date, | ||
report_count, | ||
adu, | ||
crash_hadu | ||
FROM home_page_graph | ||
JOIN product_versions USING (product_version_id); | ||
|
||
ALTER VIEW home_page_graph_view OWNER TO breakpad_rw; | ||
|
||
|
||
CREATE OR REPLACE VIEW home_page_graph_build_view | ||
AS | ||
SELECT product_version_id, | ||
product_versions.product_name, | ||
version_string, | ||
home_page_graph_build.build_date, | ||
sum(report_count) as report_count, | ||
sum(adu) as adu, | ||
crash_hadu(sum(report_count), sum(adu), throttle) as crash_hadu | ||
FROM home_page_graph_build | ||
JOIN product_versions USING (product_version_id) | ||
JOIN product_release_channels ON | ||
product_versions.product_name = product_release_channels.product_name | ||
AND product_versions.build_type = product_release_channels.release_channel | ||
GROUP BY product_version_id, product_versions.product_name, | ||
version_string, home_page_graph_build.build_date, throttle; | ||
|
||
ALTER VIEW home_page_graph_build_view OWNER TO breakpad_rw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
CREATE OR REPLACE VIEW performance_check_1 AS | ||
SELECT 1; | ||
|
||
ALTER VIEW performance_check_1 OWNER TO ganglia; | ||
CREATE VIEW performance_check_1 AS | ||
SELECT sum(report_count) FROM tcbs | ||
WHERE report_date BETWEEN ( current_date - 7 ) and current_date; | ||
|
||
|
||
ALTER TABLE public.performance_check_1 OWNER TO ganglia; | ||
|
||
-- | ||
-- Name: performance_check_1; Type: ACL; Schema: public; Owner: ganglia | ||
-- | ||
|
||
REVOKE ALL ON TABLE performance_check_1 FROM PUBLIC; | ||
REVOKE ALL ON TABLE performance_check_1 FROM ganglia; | ||
GRANT ALL ON TABLE performance_check_1 TO ganglia; | ||
GRANT SELECT ON TABLE performance_check_1 TO breakpad; | ||
GRANT SELECT ON TABLE performance_check_1 TO breakpad_ro; | ||
GRANT ALL ON TABLE performance_check_1 TO monitor; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.