Skip to content

Instantly share code, notes, and snippets.

WITH modules AS (
SELECT json_array_elements(processed_crash->'json_dump'->'modules')
AS modules
FROM processed_crashes
WHERE date_processed
BETWEEN '2014-03-05' AND '2014-03-06'
)
SELECT (modules->'debug_file')::text AS debug_file
, (modules->'debug_id')::text AS debug_id
, count(*)
diff --git a/Makefile b/Makefile
index d845594..b2fdf05 100644
--- a/Makefile
+++ b/Makefile
@@ -89,7 +89,7 @@ lint:
$(PYLINT) -f parseable --rcfile=pylintrc socorro > pylint.txt
clean:
- find ./socorro/ -type f -name "*.pyc" -exec rm {} \;
+ find ./socorro/ ./alembic/versions -type f -name "*.pyc" -exec rm {} \;
### Keybase proof
I hereby claim:
* I am rhelmer on github.
* I am rhelmer (https://keybase.io/rhelmer) on keybase.
* I have a public key whose fingerprint is 3A95 DAE1 0740 A132 7B0B 677B 91C8 8F2F CD9B 446F
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am rhelmer on github.
* I am rhelmer (https://keybase.io/rhelmer) on keybase.
* I have a public key whose fingerprint is 3A95 DAE1 0740 A132 7B0B 677B 91C8 8F2F CD9B 446F
To claim this, I am signing this object:
SELECT
product_name,
signature,
adu_date::TEXT,
build_date::TEXT,
buildid::TEXT,
crash_count,
adu_count,
os_name,
channel
@rhelmer
rhelmer / gist:4a9de6d59800aa74cae4
Last active August 29, 2015 14:01
correlations (core)
WITH total_for_sig AS (
SELECT
sum(total)
FROM correlations_core
JOIN product_versions USING (product_version_id)
JOIN signatures USING (signature_id)
WHERE report_date = '2014-05-27'
AND product_name = 'Firefox'
AND os_name = 'Mac OS X'
AND version_string = '29.0.1'
@rhelmer
rhelmer / gist:c034ecdfc7e3415ecfdc
Last active August 29, 2015 14:01
correlations (addon)
WITH total_for_sig AS (
SELECT
sum(total)
FROM correlations_addon
JOIN product_versions USING (product_version_id)
JOIN signatures USING (signature_id)
WHERE report_date = '2014-05-27'
AND product_name = 'Firefox'
AND os_name = 'Mac OS X'
AND version_string = '29.0.1'
@rhelmer
rhelmer / gist:6c27294b95ec1c9a39f9
Last active August 29, 2015 14:01
correlations (module)
WITH total_for_sig AS (
SELECT
sum(total)
FROM correlations_module
JOIN product_versions USING (product_version_id)
JOIN signatures USING (signature_id)
WHERE report_date = '2014-05-27'
AND product_name = 'Firefox'
AND os_name = 'Mac OS X'
AND version_string = '29.0.1'
@rhelmer
rhelmer / gist:10e24323935a4158458e
Last active August 29, 2015 14:01
correlations (module with version)
WITH total_for_sig AS (
SELECT
sum(total)
FROM correlations_module
JOIN product_versions USING (product_version_id)
JOIN signatures USING (signature_id)
WHERE report_date = '2014-05-27'
AND product_name = 'Firefox'
AND os_name = 'Mac OS X'
AND version_string = '29.0.1'
@rhelmer
rhelmer / gist:899f6b804041ef31c973
Created May 29, 2014 04:06
correlations (addon with version)
WITH total_for_sig AS (
SELECT
sum(total)
FROM correlations_addon
JOIN product_versions USING (product_version_id)
JOIN signatures USING (signature_id)
WHERE report_date = '2014-05-27'
AND product_name = 'Firefox'
AND os_name = 'Mac OS X'
AND version_string = '29.0.1'