Commit Graph

147 Commits

Author SHA1 Message Date
7c61686808 merge ScatterPlot into Plotter 2019-10-19 19:03:33 +02:00
d895eba47c remove duplicate values when rendering
Rendering plots with millions of values is expensive. Before this fix
we wrote all values into CSV files. The CSV files were then read by
Gnuplot that did the rendering. But in an image with n×m pixes there
can only be nm different values. In most realistic scenarios we will
have many values that will be drawn to the same pixels. So we are
wasting time yb first generation the CSV for too many values and then
by parsing that CSV again.
Fixed by using a sparse 2D array to de-duplicate many values before
they get written to the CSV. The additional time we spend de-duplicating
is often smaller than the time saved when writing the CSV, so that the
total CSV writing is about as 'fast' as before (sometimes a little
faster, sometimes a little slower). But the time Gnuplot needs for
rendering drastically reduces. The factor depends on the data, of
course. We have seen factor 50 for realistic examples. Making a 15s
job run in 300ms.
2019-09-29 18:57:57 +02:00
242c83e590 extract constants for gnuplot margins in px 2019-09-08 08:34:14 +02:00
162ef1626c reduce memory usage for computation of cumulative distribution
Before: To compute the cumulative distribution we added every duration
into a LongList. This requires O(n) memory, where n is the number of
values.

Now: We store the durations + the number of occurrences in a
LongLongHashMap. This has the potential to reduce the memory
requirements if durations occur multiple times. There are a lot of
durations with 0, 1, 2 milliseconds. In the worst case every duration
is different. In that case the memory usage doubled with this solution.

Future: We are currently storing durations with milli seconds precision.
We don't have to do that. We cannot draw 100 million different values
on the y-axis in an images with only 1000px.
2019-09-07 18:31:18 +02:00
0e9e2cd53a remove dependency to Guava 2019-09-01 15:44:36 +02:00
a174ec21ad increase contrast between scatter and cumulative distribution 2019-08-26 20:38:57 +02:00
79c28f2f9e hide tics in gallery view 2019-08-25 18:56:08 +02:00
4f61d91c79 draw tic for max value on y-axis only if it makes sense 2019-08-25 15:40:20 +02:00
a905c608aa increase maximal allowed duration for 'parallel requests' plot 2019-08-25 10:47:23 +02:00
5b57417f75 make the tics on the y-axis easier readable
People are having trouble to understand durations like
100000 or 2.7E+6 milliseconds. Therefore we are
hanging the labels on the y-axis to include the unit
in the tic's label. We also use multiples of seconds,
minutes, hours and days instead of multiples of 10.
2019-08-25 10:25:47 +02:00
4f57a29c3b increase cache of stringified longs
This should improve the csv generation a little bit.
2019-05-25 17:55:14 +02:00
2eb2a69c17 rename 'percentile' plots to 'cumulative distribution' 2019-05-12 14:30:16 +02:00
59aea1a15f introduce index clustering (part 1)
In order to prevent files from getting too big and
make it easier to implement retention policies, we
are splitting all files into chunks. Each chunk
contains the data for a time interval (1 month per
default).
This first changeset introduces the ClusteredPersistentMap
that implements this for PersistentMap. It is used
for a couple (not all) of indices.
2019-02-24 16:50:57 +01:00
24fcfd7763 prepare the addition of a date index 2018-09-28 19:07:01 +02:00
a2e63cca44 cleanup 2018-09-13 08:11:15 +02:00
2e433ba969 cleanup 2018-09-13 07:52:14 +02:00
1182d76205 replace the FolderStorage with DiskStorage
- The DiskStorage uses only one file instead of millions.
  Also the block size is only 512 byte instead of 4kb, which
  helps to reduce the memory usage for short sequences.
- Update primitiveCollections to get the new LongList.range
  and LongList.rangeClosed methods.
- BSFile now stores Time&Value sequences and knows how to
  encode the time values with delta encoding.
- Doc had to do some magic tricks to save memory. The path
  was initialized lazy and stored as byte array. This is no
  longer necessary. The patch was replaced by the
  rootBlockNumber of the BSFile.
- Had to temporarily disable the 'in' queries.
- The stored values are now processed as stream of LongLists
  instead of Entry. The overhead for creating Entries is
  gone, so is the memory overhead, because Entry was an
  object and had a reference to the tags, which is
  unnecessary.
2018-09-12 09:35:07 +02:00
2a68fd72da fix: diagonal line in parallelRequests plot 2018-08-18 12:31:11 +02:00
c1974d21b2 replace startDate + dateRange with start and end date
The new datetimepicker can be used to specify date ranges. We no longer
need to define a start date and a range. This simplifies the code
for zooming and shifting considerably.
2018-08-11 17:45:20 +02:00
58623c480f switch date picker to http://www.daterangepicker.com version 3.0.3 2018-08-11 09:09:53 +02:00
14d9216e40 create margins with constant size
With this we will be able to zoom in by selecting a region. The constant
margins allow us to determine the exact timestampt for a pixel position.
2018-08-10 09:56:57 +02:00
786570503a make plot for parallel requests easier to digest
1. draw it below the scatter plot, so that you can see both
2. make the color lighter, so that you can see both
2018-08-10 09:27:19 +02:00
2fae877444 plot parallel requests with style filledcurve
this makes the duration of requests more obvious
2018-08-09 07:51:56 +02:00
7ece779469 do not draw diagonal lines in ParallelRequestsAggregator 2018-08-09 07:37:29 +02:00
f30a8a26d9 add aggregator for parallel requests
ParallelRequestsAggregator generates a line plot that shows the number
of parallel requests among the plotted events.
This plot has two issues:
1. It only considers events that are plotted. Events that occur later,
   but were started within the plotted time frame are not considered.
2. For performance reasons we are only plotting points when a value
   changed. This leads to diagonal lines.
2018-08-09 07:24:51 +02:00
182d1edd97 add a datetime picker
Unfortunately the datetime picker does not support seconds. But it is
one of the few that support date and time and are flexible enough to
be used with VueJS.
2018-08-04 08:32:04 +00:00
6871e250ad use two lines for the xlabels instead of rotating it
We used to rotate the xlabels so that they would not intersect. A
solution that is easier to read is to add a newline between the date and
the time.
2018-08-02 08:20:33 +02:00
814af31555 add extra spaces in title of a plot when not all values are shown 2018-05-19 08:29:12 +02:00
bda2de672e improvements
- split the 'sortby' select field into two fields
- sort by average
- legend shows plotted and total values in the date range
- removed InlineDataSeries, because it was not used anymore
2018-05-01 17:32:25 +02:00
01bd7e4388 plot statistics written to the legend only count visible values 2018-05-01 13:03:34 +02:00
a4d04ebece add marker line for 60s threshold
In logarithmic plots it is not easy to spot which event are longer than
60 seconds. A thin grey line help with this.

Also: fixed the marker lines (zoom area) which broke when y-ranges were
introduced. The lines were not drawn correctly, when the y-axis offset
was greater than 0.
Gnuplot supports differen coordinate systems. 'graph' is relative to the
area within the axes, 0,0 is bottom left and 1,1 is top right. And
'first' is based on the values of the x1 axis.
By using "graph 0.25,0" we say that the starting point is 25% of the
x-axis and 0% of the y-axis without having to compute the exact values.
2018-05-01 10:51:46 +02:00
6d85c56cb0 range definitions for the y-axis
Sometimes it is useful to specify the certain y-axis range. For example
when you are only interested in the values that take longer than a
threshold. Or when you want to exclude some outliers. When you want to
compare plots in a gallery, it is very handy when all plots have the
same data-area.
2018-05-01 10:18:06 +02:00
fc64c55ce7 remove percentile plot
Eventually we want to only support what is now called aggregate, but
not have to implement different plot types. So instead of supporting
percentile plots for dashboards I removed them. You can still get
percentile plots together with the scatter plot.
2018-05-01 08:27:37 +02:00
1d8f31808e draw labels for x2 axis only if necessary
- added tics every 5 percentage points
2018-05-01 08:07:04 +02:00
bfcbd0a451 draw better dashboard images
Scaling big plots to small thumbnails results in bad images that barely
show any details.
We solve this by calling gnuplot a second time to generate the
thumbnails. They don't have any labels and are rendered in the required
size, so that not scaling is necessary.
Thumbnails have to be requested explicitly, because it can be expensive
to compute them.
2018-05-01 07:54:10 +02:00
2a9cb2cde6 create thumbnails as PNG 2018-04-29 08:54:13 +02:00
022d5a21c5 do not try to create a thumbnail if the image doesn't exist 2018-04-28 19:59:00 +02:00
2da54432ff sort tiles on the dashboard 2018-04-28 19:03:07 +02:00
913057c6df add dashboard 2018-04-27 19:36:31 +02:00
7018a11ab3 add links to current settings and to current image 2018-04-10 19:59:09 +02:00
5e53e667fe use vue.js for the UI 2018-04-02 09:18:41 +02:00
c581e352e4 add method that returns a string representation of the tags in Tags 2018-03-19 19:29:22 +01:00
ahr
6b60fd542c add percentile plots 2018-03-03 08:19:26 +01:00
b4a0514267 draw points and percentile lines with the same color 2018-01-21 14:09:34 +01:00
bb7701e7c4 use enum for line type instead of string 2018-01-21 11:01:30 +01:00
8f15aba0d5 replace individual percentile aggregates with a single one for all 2018-01-21 10:54:13 +01:00
ahr
0f2fcc3c9c extract long_to_string converter 2018-01-06 08:40:58 +01:00
ahr
5617547d63 add percentile plots 2017-12-30 09:15:26 +01:00
ahr
9b9554552d Extract interface for DataSeries
This will make it possible to have DataSeries that do not require a csv
file on disk.
2017-12-29 09:15:29 +01:00
ahr
cc70f45c12 add different plot types
Step 1: 
Added PlotType enum and a drop down to the UI.
Extracted the code for scatter plots.
2017-12-29 08:57:34 +01:00