Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d53e637
Move oonidata related functions into a separate package
hellais Feb 1, 2022
dc164f7
Implement sync functionality
hellais Feb 2, 2022
6f2f602
Fix broken metrics import
hellais Feb 2, 2022
1c51f5a
Use mocked statsd client when import is not available
hellais Feb 2, 2022
d2c302d
Fixup setup.py
hellais Feb 2, 2022
3b32917
Fix script path
hellais Feb 4, 2022
cd28117
Fix timer mock
hellais Feb 4, 2022
f795b5e
Add support for trimming strings longer than a certain length
hellais Feb 4, 2022
df42f2a
Sync command now fetches data from s3
hellais Feb 8, 2022
85dbab0
More refactoring in preparation for supporting jsonl in fastpath
hellais Feb 10, 2022
72fc33d
Refactoring of the jsonl related functionality
hellais Feb 11, 2022
f2e5094
Fix bug in logic for determining ranges
hellais Feb 11, 2022
9eda084
Improvements to oonidata CLI
hellais Feb 15, 2022
e078658
TMP commit
hellais Feb 15, 2022
ed605cc
Refactor all code related to can and jsonl listing
hellais Feb 15, 2022
8ece3f5
Reflow using black
hellais Feb 15, 2022
f779ad6
Adjust oonidata CLI based on changes in s3feeder
hellais Feb 15, 2022
64fdcdc
Small cosmetic improvements to the CLI
hellais Feb 15, 2022
b450860
Reflow with black
hellais Feb 15, 2022
a271bed
Fix typo
hellais Feb 15, 2022
589f9c8
Simplify jsonl listing
hellais Feb 16, 2022
9e78b6a
Use day instead of timestamp
hellais Feb 16, 2022
849610f
Fix typo
hellais Feb 16, 2022
bbf8e82
Fix parsing in s3feeder
hellais Feb 16, 2022
f9c2cf2
Bugfix related to inconsistent filename in legacy jsonl vs new jsonl …
hellais Feb 16, 2022
6138e11
Fix log line
hellais Feb 16, 2022
0af8a04
Include in listing yaml.lz4 files
hellais Feb 16, 2022
f76d8fe
Bugfixing of listing for legacy cans
hellais Feb 16, 2022
25d9bd7
Use XX as unknow country code as key for cans
hellais Feb 16, 2022
8f2afc2
Don't display warning for non jsonl
hellais Feb 16, 2022
cea7bb0
Boost performance of the jsonl_in_range function
hellais Feb 17, 2022
bee5679
Drop TransferConfig
hellais Feb 17, 2022
b92ea29
Don't perform listing optimisations for ranges larger than 20 days
hellais Feb 17, 2022
b6be947
Add support for parallel listing and download of data
hellais Feb 17, 2022
a371ce4
Fix bug in minican listing
hellais Feb 17, 2022
6fe7656
Fix fastpath tests
hellais Feb 18, 2022
76ad460
Fix bug in unit test
hellais Feb 18, 2022
95e7298
Adjust the listing heuristic
hellais Feb 18, 2022
98b1c76
Fix bug spotted via unit tests
hellais Feb 18, 2022
917d65d
Don't parallelise stream_measurements
hellais Feb 21, 2022
8a96844
Fix typo in stream_jsonl_measurements
hellais Feb 21, 2022
afdde0d
Merge remote-tracking branch 'origin/master' into oonidata
hellais Mar 14, 2022
79dd249
Only look inside the jsonl tree if we need to
hellais Apr 6, 2022
30a8319
Remove invalid import
hellais Apr 6, 2022
73a5ca2
Add support for benchmarking threadpool vs processpool
hellais Apr 6, 2022
08b321f
Put the closure outside of the function
hellais Apr 6, 2022
eb97646
Use a partial instead of closure to get process pool to work
hellais Apr 6, 2022
590cf4e
Update oonidata/oonidata/s3feeder.py
hellais Apr 6, 2022
150fa29
Add metadata for publication of pypi
hellais Apr 12, 2022
3543ae6
Add .gitignore
hellais Apr 12, 2022
9cfc53f
Merge branch 'oonidata' of github.com:ooni/pipeline into oonidata
hellais Apr 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions af/fastpath/fastpath/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
no_journal_handler = True

# Feeds measurements from S3
import fastpath.s3feeder as s3feeder
import fastpath.oonidata.s3feeder as s3feeder

# Feeds measurements from a local HTTP API
from fastpath.localhttpfeeder import start_http_api

# Push measurements into Postgres
import fastpath.db as db

from fastpath.metrics import setup_metrics
from fastpath.mytypes import MsmtTup
from fastpath.oonidata.metrics import setup_metrics
from fastpath.oonidata.mytypes import MsmtTup
import fastpath.portable_queue as queue

import fastpath.utils
import fastpath.oonidata.utils

LOCALITY_VALS = ("general", "global", "country", "isp", "local")

Expand Down Expand Up @@ -725,7 +725,7 @@ def get_http_header(resp, header_name, case_sensitive=False):

# backward compatibility with older measurements that don't have
# header_list
if "header_list" not in resp:
if "headers_list" not in resp:
headers = resp.get("headers", {})
header_list = [[h,v] for h,v in headers.items()]
else:
Expand Down Expand Up @@ -1617,7 +1617,7 @@ def setup_fingerprints():
fingerprints = {
"ZZ": {"body_match": [], "header_prefix": [], "header_full": [], "dns_full": []}
}
for cc, fprints in fastpath.utils.fingerprints.items():
for cc, fprints in fastpath.oonidata.utils.fingerprints.items():
d = fingerprints.setdefault(cc, {})
for fp in fprints:
assert fp["locality"] in LOCALITY_VALS, fp["locality"]
Expand Down
2 changes: 1 addition & 1 deletion af/fastpath/fastpath/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
pass
import ujson

from fastpath.metrics import setup_metrics
from fastpath.oonidata.metrics import setup_metrics

log = logging.getLogger("fastpath.db")
metrics = setup_metrics(name="fastpath.db")
Expand Down
24 changes: 0 additions & 24 deletions af/fastpath/fastpath/metrics.py

This file was deleted.

1 change: 1 addition & 0 deletions af/fastpath/fastpath/oonidata
4 changes: 2 additions & 2 deletions af/fastpath/fastpath/reprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
import statsd # debdeps: python3-statsd

import fastpath.db as db
import fastpath.s3feeder as s3f
import fastpath.oonidata.s3feeder as s3f
from fastpath.core import score_measurement, setup_fingerprints, unwrap_msmt
from fastpath.utils import trivial_id
from fastpath.oonidata.utils import trivial_id

metrics = statsd.StatsClient("127.0.0.1", 8125, prefix="reprocessor")
log = logging.getLogger("reprocessor")
Expand Down
Loading