Commit Graph

480 Commits

Author SHA1 Message Date
iwakeh
86c47d3764 Use enum for request method. 2018-02-05 18:06:23 +01:00
iwakeh
bbae561733 Store size as simple int. 2018-02-05 18:06:18 +01:00
iwakeh
be9624a17b Prepare date strings lazily in order to improve performance. 2018-02-05 18:01:53 +01:00
iwakeh
3cd814d848 Add new descriptor type for web server access logs.
Implements task-22983 and is based on the log-descriptor
specification.
2018-01-31 13:29:07 +01:00
iwakeh
5903c10565 Added package-info. 2018-01-31 13:25:14 +01:00
iwakeh
c29327ddc9 Added a space. 2018-01-31 13:25:06 +01:00
Karsten Loesing
2152ece320 Update copyright to 2018. 2018-01-09 10:24:25 +01:00
Karsten Loesing
79a4b9866f Update to latest metrics-base. 2017-12-04 12:12:24 +01:00
Karsten Loesing
663bdc285c Update to latest metrics-base. 2017-10-26 10:51:39 +02:00
Karsten Loesing
03bc88c23b Bump version to 2.1.1-dev. 2017-10-17 21:21:18 +02:00
Karsten Loesing
a8c9232e9f Prepare for 2.1.1 release. 2017-10-09 14:04:00 +02:00
iwakeh
02ad9fcde0 Write build revision to index.json files.
Implements part of task-21414.
Adapt IndexNode to supply a revision.
2017-10-06 17:13:43 +02:00
iwakeh
992bf36ad2 Adapt all links in overview.html.
Implement task-23597.  Reflect changes of links in Trac module names
and Metrics' website.
2017-09-15 14:07:06 +00:00
Karsten Loesing
6b8de66d17 Bump version to 2.1.0-dev. 2017-09-15 16:07:05 +02:00
Karsten Loesing
27e1ff0497 Prepare for 2.1.0 release. 2017-09-15 11:25:29 +02:00
Karsten Loesing
65c266a8f9 Update to Java 8. 2017-09-15 11:20:43 +02:00
Karsten Loesing
13a22d9ebe Update to latest metrics-base.
But override the switch from Java 7 to 8 until all metrics libraries
depending on metrics-lib have upgraded to Java 8 first.
2017-09-05 14:03:51 +02:00
iwakeh
f533c3d91d Avoid internal packages' javadoc in public javadoc API. 2017-08-29 11:43:35 +02:00
iwakeh
e0aa5eb81d Fix javadoc in Descriptor. 2017-08-15 09:27:27 +02:00
iwakeh
4ee320caea Move FileType and add PLAIN FileType for no compression. 2017-08-15 09:27:22 +02:00
iwakeh
e2246804e3 Removed javadoc links to removed interfaces. 2017-07-28 07:53:29 +00:00
iwakeh
e0c5774529 Avoid compiler warnings in test classes. 2017-07-28 07:53:28 +00:00
iwakeh
925b4a1f80 Add tests for Descriptor methods. Implements task-22912.
The different tests have separate methods for clarity when tests fail.
This is more important than the additional overhead of repeated
iteration over the test-descriptors, which are kept small.
2017-07-28 09:53:27 +02:00
Karsten Loesing
d00a28fe2d Add test for #22912. 2017-07-14 11:19:45 +02:00
Karsten Loesing
44e1c2566b Retain trailing newline in Torperf results.
Fixes #22912.
2017-07-13 11:34:11 +02:00
Karsten Loesing
8678345af9 Avoid non-ASCII characters in expected messages.
This currently breaks Jenkins build, which is not exactly our fault
but Jenkin's. But this is test code, so it's easier to just adapt.
2017-07-03 15:48:13 +02:00
Karsten Loesing
0da6953cdd Update to Debian stretch libraries. 2017-07-03 15:19:20 +02:00
Karsten Loesing
e38ed79daf Bump version to 2.0.0-dev.
Also include missing change log entry that was supposed to go into
2.0.0.
2017-06-28 19:56:11 +02:00
Karsten Loesing
82a8d92b66 Prepare for 2.0.0 release. 2017-06-28 11:49:27 +02:00
iwakeh
047f8c7c53 Rename jar files and release tarball. 2017-06-28 11:42:31 +02:00
iwakeh
0d4898df6c Rename 'DescripTor' to 'Tor Metrics Library' as part of task-22732. 2017-06-26 20:12:13 +00:00
iwakeh
27f05e1d4c All examples compile and work as explained in Metrics' web-site tutorials.
Added a hint about where to find the examples to the README.md file.
Implements task-22734.
2017-06-26 20:12:12 +00:00
Karsten Loesing
1b3fd15f92 Tweak tests for removing deprecated code for #22154.
This patch makes the following changes:
 - Remove now unused import in DescriptorParser.
 - Rename methods in DescriptorParserImpl to please checkstyle.
 - Tweak a few things in DescriptorReaderImplTest, including accepting
   varargs for dirs and putting back expected excluded files.
 - Remove tests that were previously testing deprecated methods which
   are now gone.
 - Change the two tests ending in NoDescriptors() back so that they
   really don't read any descriptors.
 - Put back tests for unrecognized lines, but don't expect
   DescriptorParseExceptions anymore and instead check
   getUnrecognizedLines().
2017-06-26 22:12:10 +02:00
Karsten Loesing
946b261e6c Remove more deprecated code for #22154.
This patch makes the following changes:
 - Remove (non-deprecated) method
   DescriptorParser#parseDescriptors(byte[], String) which we clearly
   forgot to deprecate earlier and which we shouldn't support in the
   future. It returns a List (rather than Iterable) and throws
   DescriptorParseException rather than include UnparseableDescriptor
   in the result. Might deserve an extra notice in the change log.
 - Put back a few lines `this.unrecognizedLines.add(line);` which got
   lost in previous commits.
 - Remove `failUnrecognizedDescriptorLines` parameters everywhere.
 - Remove more obsolete code from DescriptorReaderImpl.
 - Remove now obsolete attribute oldExitListEntries from ExitListImpl.
2017-06-26 18:12:45 +02:00
iwakeh
c57517c7a9 Make tests pass again.
(one still fails: testDirectorySignaturesLinesTwoAlgorithms in RelayNetworkStatusVoteImplTest)
Part of task-22154.
2017-06-23 08:37:50 +00:00
iwakeh
5148de2267 Make tests and benchmark compile; tests fail currently.
Part of task-22154.
2017-06-23 08:37:47 +00:00
iwakeh
a56c96d66c Remove all deprecation warnings. Test might not compile yet.
Part of task-22154.
2017-06-23 08:37:46 +00:00
Karsten Loesing
2f6c9baa68 Always use UTF-8 as charset.
Implements #21932.
2017-06-23 10:37:41 +02:00
Karsten Loesing
a86225335e Remove custom ImplementationNotAccessibleException.
Implements #22476.
2017-06-22 14:38:47 +02:00
Karsten Loesing
cad14ead4c Bump version to 1.9.0-dev. 2017-06-21 14:21:19 +02:00
Karsten Loesing
3c98457777 Prepare for 1.9.0 release. 2017-06-20 22:36:58 +02:00
Karsten Loesing
a113feb2c4 Add new method to retrieve raw descriptor length.
When we switched from storing copies of byte[] to storing byte[]
references, offset, and length, getRawDescriptor() suddenly became
more expensive than before.  (Before that, copying bytes in the first
place was always expensive.)  If an application only calls
Descriptor#getRawDescriptorBytes() to learn the array length, there's
now a more efficient way to provide that information.
2017-06-20 20:24:12 +02:00
Karsten Loesing
1062da637f Make DescriptorFile obsolete.
This change simplifies the DescriptorReader interface and allows for
shorter and more concise application code.  The result is that
DescriptorReader returns Descriptor instances rather than
DescriptorFile instances containing Descriptors and accepts a maximum
queue size in Descriptors, DescriptorFile is deprecated, and
Descriptor contains a File reference to the descriptor file.
Implements #22141.

Related to this change, this commit introduces a new
UnparseableDescriptor to be returned by DescriptorParser and
DescriptorReader if a descriptor cannot be parsed, as opposed to
throwing a DescriptorParseException or skipping the entire descriptor
file (fixes #22139), respectively.

Also related to this change, DescriptorParser now returns an Iterable
instead of a List, which prepares parsing large descriptor files
descriptor by descriptor (will be tackled in #20395).
2017-06-20 20:21:29 +02:00
Karsten Loesing
0236dc7771 Rename two parse* methods to verify*. 2017-06-19 11:42:18 +02:00
Karsten Loesing
de9600a5dc Change encoding of microdescriptor digests in network status entries.
Fixes #22640.
2017-06-17 21:39:24 +02:00
Karsten Loesing
47a69b342f Add a test for the encoding of microdescriptor digests in votes 2017-06-17 21:18:11 +02:00
Karsten Loesing
59dc55fbe1 Bump version to 1.8.2-dev. 2017-06-16 17:03:41 +02:00
Karsten Loesing
be96d96b83 Prepare for 1.8.2 release. 2017-06-16 16:54:50 +02:00
iwakeh
3affad3f88 Add test for task-22634. 2017-06-16 12:55:35 +00:00
iwakeh
5954b34462 Make DescriptorParserImpl.parseDescriptor easily accessible for testing. 2017-06-16 12:55:34 +00:00