Commit Graph

99 Commits

Author SHA1 Message Date
Karsten Loesing
3a663e8ff6 Update to latest metrics-base and metrics-lib.
This update includes an update of PostgreSQL JDBC driver version to
42.2.5.
2019-09-17 10:05:27 +02:00
Karsten Loesing
c3d9c42d07 Fix links on CollecTor page, again.
Include metrics-lib-*-thin.jar rather than metrics-lib-*.jar.

Re-closes #24792.
2019-08-21 08:33:05 +02:00
Karsten Loesing
bba56f6a53 Fix generated metrics-lib JavaDocs. 2019-08-07 21:33:34 +02:00
Karsten Loesing
844fcbe9f7 Use Ivy for resolving external dependencies.
Includes a metrics-lib upgrade to 2.6.2 and an upgrade to the latest
metrics-base commit 256e619.

Implements part of #31326.
2019-08-06 17:33:26 +02:00
Karsten Loesing
31c4f88ebb Adapt "About Tor" links to redesigned Tor website.
Reported by nusenu, changes suggested by irl.

Fixes #30415.
2019-05-13 17:22:04 +02:00
Karsten Loesing
829863f48f Run modules from Java only.
Implements #29166.
2019-03-06 21:28:15 +01:00
Karsten Loesing
b605298c66 Rewrite advbwdist's aggregate.R in Java.
This is yet another step torwards making the daily update Java-only.

Implements #28801.
2018-12-23 11:34:29 +01:00
Karsten Loesing
a367168a78 Rewrite censorship detector in Java.
This allows us to remove the last remaining Python parts from the daily
updater.

Implements #21588.
2018-12-20 12:16:25 +01:00
Karsten Loesing
f5ef5fb0d8 Access userstats database from Java only.
Previously, we used Java to write .sql files, imported them using
psql, and afterwards made queries via psql. Now we're using Java to
interact with the database directly. This is another step towards
making the daily updater Java-only.
2018-12-20 12:14:18 +01:00
Karsten Loesing
2c44721c9a Use readr to speed up drawing graphs.
Over two years ago, in commit 1f90b72 from October 2016, we made our
user graphs faster by avoiding to read the large .csv file on demand.
Instead we read it once as part of the daily update, saved it to disk
as .RData file using R's save() function, and loaded it back to memory
using R's load() function when drawing a graph.

This approach worked okay. It just had two disadvantages:

 1. We had to write a small amount of R code for each graph type,
    which is why we only did it for graphs with large .csv files.
 2. Running these small R script as part of the daily update made it
    harder to move away from Ant towards a Java-only execution model.

The new approach implemented in this commit uses read_csv() fromt the
readr package which reads CSV files several times faster than
read.csv().

Requires installing the readr package from CRAN, which is available on
Debian in stretch-backports and later as r-cran-readr.

Implements #28799.
2018-12-19 20:38:08 +01:00
Karsten Loesing
c95125a2b3 Rename ipv6servers module to servers.
Part of #28116.
2018-11-14 17:10:33 +01:00
Karsten Loesing
f8fa108d18 Modernize legacy module and rename it to bwhist.
Changes include using similar mechanisms for configuration, calling
the database aggregation function, querying the database, and writing
results as we're using in the ipv6servers and other modules.

Configuration options can now be changed via the following Java
properties:

bwhist.descriptors
bwhist.database
bwhist.history
bwhist.output

The legacy.config file, if one exists, will be ignored.

Part of #28116.
2018-11-14 17:10:33 +01:00
Karsten Loesing
28d42211d3 Use ipv6servers' CSV files instead of servers.csv. 2018-11-11 10:16:30 +01:00
Karsten Loesing
dda2b51eaa Compute percentiles in advbwdist module using linear interpolation.
So far we computed percentiles in the advbwdist module using our own
formula that picked existing values for the various percentiles we
provided.

Now we're using Apache Commons Math with method R_7 which uses linear
interpolation when a percentile lies between two data points.

Implements another part of #26035.
2018-10-25 11:31:08 +02:00
Karsten Loesing
285be4447d Add graph with total cw across bwauths.
Implements #25459.
2018-10-16 16:02:58 +02:00
Karsten Loesing
0f30892d8e Bump version to 1.2.0-dev. 2018-09-26 17:21:00 +02:00
Karsten Loesing
581c62e94b Prepare for 1.2.0 release. 2018-09-25 09:30:45 +02:00
Karsten Loesing
87d159ca68 Update to ExoneraTor 3.0.1. 2018-08-28 12:33:04 +02:00
Karsten Loesing
b60cf28654 Integrate ExoneraTor as its own web page.
Implements #23549.
2018-08-14 20:49:37 +02:00
Iain R. Learmonth
629a828e52 Fixes loading JSON for aggregated map plotting 2018-08-08 10:14:47 +02:00
Iain R. Learmonth
32a35f3f95 Integrate RelaySearch (Fixes: #25392)
This is using commit b6e6c3235806c9d1521dbc2c08cecee626466928 of atlas.git.

 * Removes submodule for RS.
 * Move two license files to basedirectory; these should be merged.
 * Move atlas.css into css folder
 * Fonts in both were identical
 * Changes all findable paths to the new setting
 * js libs were simply copied; these should be sorted out more
 * Merged rs/img and rs/images folder into images

Thanks to iwakeh for the bulk of the work in this commit.
2018-07-02 14:44:03 +01:00
Karsten Loesing
9ff5462584 Bump version to 1.1.0-dev. 2018-05-30 15:46:39 +02:00
Karsten Loesing
1284c8adf8 Prepare for 1.1.0 release. 2018-05-29 15:21:45 +02:00
Karsten Loesing
205d6da163 Replace Gson with Jackson.
Note that a side-effect of this change is that the generated news.json
uses slightly different formatting. These are just cosmetic changes
that don't have any effect on provided website content.

Implements #26169.
2018-05-29 15:18:52 +02:00
Karsten Loesing
5c8eec9d0e Remove the PostgreSQL jar from our war file.
Another part of #25699.
2018-05-18 16:05:14 +02:00
Karsten Loesing
f4c98122da Throw out Apache Commons Lang 2 in favor of 3.
Part of #25699.
2018-05-18 16:05:08 +02:00
iwakeh
b1e05125fa Make war-task depend on jar-task.
This makes the git-revision available.
2018-04-16 11:21:13 +02:00
iwakeh
533225c425 Provide no-data pictures, pdfs, and csv files instead of server error.
Implements task-25264.
2018-03-28 16:43:38 +02:00
Karsten Loesing
ac10cec5a8 Make generate-specs target optional.
Without this change, `ant war` would not succeed, because it finds the
spec JSP files in two places with the same name, and that is not
allowed.
2018-03-28 16:41:19 +02:00
iwakeh
3be34c3be4 Convert shell script into Ant task. 2018-03-27 17:13:38 +02:00
Karsten Loesing
7be397890d Adapt webstats to read logs from CollecTor.
In this change we:
 - update metrics-lib to 2.2.0,
 - start downloading and processing logs from CollecTor rather than
   from webstats.torproject.org,
 - change log line counts from int to long,
 - remove webstats tests which are now contained in metrics-lib,
 - update the CollecTor page, and
 - take out the beta notice from the Tor web server logs page.

Implements #25520.
2018-03-24 10:31:06 +01:00
Iain R. Learmonth
f70408df04 Adds generate-news-json Ant task
This commit updates UpdateNews to use the existing News class and to
accept the output filename as an argument. It also enables pretty
printing the output to remove the additional manual step of piping the
output through jq. (See #23854 comment:9)

The new Ant task requires that the JAR be built prior to running. It
will update news.json in place.
2018-03-21 12:07:40 +00:00
Iain R. Learmonth
252d4635df Adds an Ant target to generate PNGs using Graphviz 2018-03-03 06:37:32 +00:00
Iain R. Learmonth
f5a27ce3ae Include Relay Search assets in generated WAR (See: #25258) 2018-02-15 21:07:24 +00:00
Karsten Loesing
c78da5d11c Fix path.
Related to renaming packages/modules in #24294.
2018-01-31 20:29:56 +01:00
Karsten Loesing
92567231da Rename packages.
- Rename root package org.torproject.metrics to
   org.torproject.metrics.stats to make it part of the Tor Metrics
   name space.
 - ernie.cron becomes org.torproject.metrics.stats.servers to get rid
   of the legacy name and to reflect that it's all about servers and
   bandwidth (provided by servers).
 - org.torproject.metrics.web remains unchanged.
 - org.torproject.metrics.web.graphs and
   org.torproject.metrics.web.research are merged into
   org.torproject.metrics.web.
 - Remove special treatment for legacy package names, which is not
   necessary anymore.

Resolves #24294.
2018-01-31 13:15:58 +01:00
Karsten Loesing
9c2bae83e5 Unbreak links on CollecTor subpages.
The issue was that we didn't include required libraries for fetching
and parsing CollecTor's index.json file.

Fixes #24792.
2018-01-08 10:52:33 +01:00
iwakeh
d9b8b8f998 Added task(s) for running pgTAP tests. 2017-12-22 20:27:39 +01:00
Karsten Loesing
184fb88ce0 Make ipv6servers.csv available, too. 2017-12-22 20:16:51 +01:00
iwakeh
ede6be2e5c Move new module to proper place(s) in the source tree.
This includes moving the Java and Sql sources as well as test sources,
and adaption of paths in test classes.  Created an ant task 'ipv6server'
and added its call to run-web-prepare target.
2017-12-22 14:14:52 +01:00
iwakeh
41f651ecd5 Add comment to run-rserver task. 2017-12-20 15:40:29 +00:00
Karsten Loesing
2419892675 Bump version to 1.0.3-dev. 2017-12-20 16:35:47 +01:00
Karsten Loesing
d8e8c3ddae Prepare for 1.0.3 release. 2017-12-20 15:28:35 +01:00
Karsten Loesing
3b5aadfce1 Copy .RData files where they belong. 2017-12-20 09:57:24 +01:00
Karsten Loesing
51ea118abe Raise memory from 2g to 4g for all module runs. 2017-12-19 10:27:36 +01:00
iwakeh
712af40b7f Adapt work-directory default to production server setting. 2017-12-18 15:45:03 +00:00
iwakeh
940e00cc75 Make paths absolute and add concluding echo messages to helper tasks. 2017-12-18 10:11:58 +01:00
iwakeh
65f9c6de35 Ensure that java runs don't depend on server locale.
As in commit 32b0a83 this leads to problems in locales not using a decimal dot.
2017-12-18 10:11:58 +01:00
iwakeh
32003c6e66 Add ant task for war creation.
Also move all website related java sources to main src folder.
2017-12-18 09:43:31 +01:00
iwakeh
dc5d5706e8 Add web classpath patternsets to build.xml. 2017-12-18 09:43:31 +01:00