├── .gitignore
├── COPYING.txt
├── LICENSE.txt
├── README.md
├── examples
└── screenshots
│ ├── examplePercentilePlot.png
│ └── exampleTimelinePlot.png
├── pom.xml
└── src
└── main
├── assembly
└── dist.xml
├── java
└── org
│ └── HdrHistogram
│ └── HistogramLogAnalyzer
│ ├── applicationlayer
│ ├── AboutDialog.java
│ ├── Application.java
│ ├── Configuration.java
│ ├── ConstantsHelper.java
│ ├── DnDTabbedPane.java
│ ├── ElapsedTimeAndValue.java
│ ├── HLAChartType.java
│ ├── HLAPanel.java
│ ├── HLATabbedPane.java
│ ├── PlotFilesDialog.java
│ ├── PlotFilesMode.java
│ ├── PrintStatistics.java
│ ├── TabCloseComponent.java
│ ├── TabsListener.java
│ ├── Version.java.template
│ └── ZFileChooser.java
│ ├── charts
│ ├── BucketsChartBuilder.java
│ ├── ColorHelper.java
│ ├── CommonSeries.java
│ ├── CommonSeriesCollection.java
│ ├── HLATimeSeries.java
│ ├── HLATimeSeriesCollection.java
│ ├── HLAXYSeries.java
│ ├── HLAXYSeriesCollection.java
│ ├── PercentileChartBuilder.java
│ ├── TimelineChartBuilder.java
│ └── TimelineDatasetBuilder.java
│ ├── datalayer
│ ├── BucketIterator.java
│ ├── DBConnect.java
│ ├── DBManager.java
│ ├── HistogramModel.java
│ ├── LogGeneratorType.java
│ ├── MaxPercentileIterator.java
│ ├── PercentileIterator.java
│ ├── ResultSetIterator.java
│ ├── TagsHelper.java
│ └── TimelineIterator.java
│ ├── dataobjectlayer
│ ├── BucketObject.java
│ ├── PercentileObject.java
│ └── TimelineObject.java
│ ├── panels
│ ├── DatePanel.java
│ ├── MWPPanel.java
│ └── SLAPanel.java
│ └── properties
│ ├── AppProperties.java
│ ├── DateProperties.java
│ ├── HPLProperties.java
│ ├── MWPProperties.java
│ ├── SLAProperties.java
│ ├── ScaleProperties.java
│ ├── ViewProperties.java
│ └── ZoomProperties.java
└── resources
└── org
└── HdrHistogram
└── HistogramLogAnalyzer
├── applicationlayer
├── License.html
├── SLAdetails.xml
├── azul_logo.png
├── icon_close.png
├── icon_close2.png
├── icon_maxrange.png
├── icon_open.png
├── icon_photo.png
└── icon_sla.png
└── panels
├── icon_add.png
├── icon_apply.png
└── icon_delete.png
/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .idea
3 | out
4 | gh-pages
5 | .classpath
6 | .project
7 | .settings
8 | release.properties
9 | pom.xml.releaseBackup
10 | src/main/java/org/HdrHistogram/HistogramLogAnalyzer/applicationlayer/Version.java
11 | *.a
12 | *.iml
13 | *.o
14 | .DS_Store
15 | build
16 | dependency-reduced-pom.xml
17 |
--------------------------------------------------------------------------------
/COPYING.txt:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 |
3 | CC0 1.0 Universal
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12 | HEREUNDER.
13 |
14 | Statement of Purpose
15 |
16 | The laws of most jurisdictions throughout the world automatically confer
17 | exclusive Copyright and Related Rights (defined below) upon the creator
18 | and subsequent owner(s) (each and all, an "owner") of an original work of
19 | authorship and/or a database (each, a "Work").
20 |
21 | Certain owners wish to permanently relinquish those rights to a Work for
22 | the purpose of contributing to a commons of creative, cultural and
23 | scientific works ("Commons") that the public can reliably and without fear
24 | of later claims of infringement build upon, modify, incorporate in other
25 | works, reuse and redistribute as freely as possible in any form whatsoever
26 | and for any purposes, including without limitation commercial purposes.
27 | These owners may contribute to the Commons to promote the ideal of a free
28 | culture and the further production of creative, cultural and scientific
29 | works, or to gain reputation or greater distribution for their Work in
30 | part through the use and efforts of others.
31 |
32 | For these and/or other purposes and motivations, and without any
33 | expectation of additional consideration or compensation, the person
34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35 | is an owner of Copyright and Related Rights in the Work, voluntarily
36 | elects to apply CC0 to the Work and publicly distribute the Work under its
37 | terms, with knowledge of his or her Copyright and Related Rights in the
38 | Work and the meaning and intended legal effect of CC0 on those rights.
39 |
40 | 1. Copyright and Related Rights. A Work made available under CC0 may be
41 | protected by copyright and related or neighboring rights ("Copyright and
42 | Related Rights"). Copyright and Related Rights include, but are not
43 | limited to, the following:
44 |
45 | i. the right to reproduce, adapt, distribute, perform, display,
46 | communicate, and translate a Work;
47 | ii. moral rights retained by the original author(s) and/or performer(s);
48 | iii. publicity and privacy rights pertaining to a person's image or
49 | likeness depicted in a Work;
50 | iv. rights protecting against unfair competition in regards to a Work,
51 | subject to the limitations in paragraph 4(a), below;
52 | v. rights protecting the extraction, dissemination, use and reuse of data
53 | in a Work;
54 | vi. database rights (such as those arising under Directive 96/9/EC of the
55 | European Parliament and of the Council of 11 March 1996 on the legal
56 | protection of databases, and under any national implementation
57 | thereof, including any amended or successor version of such
58 | directive); and
59 | vii. other similar, equivalent or corresponding rights throughout the
60 | world based on applicable law or treaty, and any national
61 | implementations thereof.
62 |
63 | 2. Waiver. To the greatest extent permitted by, but not in contravention
64 | of, applicable law, Affirmer hereby overtly, fully, permanently,
65 | irrevocably and unconditionally waives, abandons, and surrenders all of
66 | Affirmer's Copyright and Related Rights and associated claims and causes
67 | of action, whether now known or unknown (including existing as well as
68 | future claims and causes of action), in the Work (i) in all territories
69 | worldwide, (ii) for the maximum duration provided by applicable law or
70 | treaty (including future time extensions), (iii) in any current or future
71 | medium and for any number of copies, and (iv) for any purpose whatsoever,
72 | including without limitation commercial, advertising or promotional
73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74 | member of the public at large and to the detriment of Affirmer's heirs and
75 | successors, fully intending that such Waiver shall not be subject to
76 | revocation, rescission, cancellation, termination, or any other legal or
77 | equitable action to disrupt the quiet enjoyment of the Work by the public
78 | as contemplated by Affirmer's express Statement of Purpose.
79 |
80 | 3. Public License Fallback. Should any part of the Waiver for any reason
81 | be judged legally invalid or ineffective under applicable law, then the
82 | Waiver shall be preserved to the maximum extent permitted taking into
83 | account Affirmer's express Statement of Purpose. In addition, to the
84 | extent the Waiver is so judged Affirmer hereby grants to each affected
85 | person a royalty-free, non transferable, non sublicensable, non exclusive,
86 | irrevocable and unconditional license to exercise Affirmer's Copyright and
87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
88 | maximum duration provided by applicable law or treaty (including future
89 | time extensions), (iii) in any current or future medium and for any number
90 | of copies, and (iv) for any purpose whatsoever, including without
91 | limitation commercial, advertising or promotional purposes (the
92 | "License"). The License shall be deemed effective as of the date CC0 was
93 | applied by Affirmer to the Work. Should any part of the License for any
94 | reason be judged legally invalid or ineffective under applicable law, such
95 | partial invalidity or ineffectiveness shall not invalidate the remainder
96 | of the License, and in such case Affirmer hereby affirms that he or she
97 | will not (i) exercise any of his or her remaining Copyright and Related
98 | Rights in the Work or (ii) assert any associated claims and causes of
99 | action with respect to the Work, in either case contrary to Affirmer's
100 | express Statement of Purpose.
101 |
102 | 4. Limitations and Disclaimers.
103 |
104 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
105 | surrendered, licensed or otherwise affected by this document.
106 | b. Affirmer offers the Work as-is and makes no representations or
107 | warranties of any kind concerning the Work, express, implied,
108 | statutory or otherwise, including without limitation warranties of
109 | title, merchantability, fitness for a particular purpose, non
110 | infringement, or the absence of latent or other defects, accuracy, or
111 | the present or absence of errors, whether or not discoverable, all to
112 | the greatest extent permissible under applicable law.
113 | c. Affirmer disclaims responsibility for clearing rights of other persons
114 | that may apply to the Work or any use thereof, including without
115 | limitation any person's Copyright and Related Rights in the Work.
116 | Further, Affirmer disclaims responsibility for obtaining any necessary
117 | consents, permissions or other rights required for any use of the
118 | Work.
119 | d. Affirmer understands and acknowledges that Creative Commons is not a
120 | party to this document and has no duty or obligation with respect to
121 | this CC0 or use of the Work.
122 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | * This code was Written by Azul Systems, and released to the
2 | * public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/
3 |
4 | For users of this code who wish to consume it under the "BSD" license
5 | rather than under the public domain or CC0 contribution text mentioned
6 | above, the code found under this directory is *also* provided under the
7 | following license (commonly referred to as the BSD 2-Clause License). This
8 | license does not detract from the above stated release of the code into
9 | the public domain, and simply represents an additional license granted by
10 | the Author.
11 |
12 | -----------------------------------------------------------------------------
13 | ** Beginning of "BSD 2-Clause License" text. **
14 |
15 | Copyright (c) 2015, 2016 Azul Systems
16 | All rights reserved.
17 |
18 | Redistribution and use in source and binary forms, with or without
19 | modification, are permitted provided that the following conditions are met:
20 |
21 | 1. Redistributions of source code must retain the above copyright notice,
22 | this list of conditions and the following disclaimer.
23 |
24 | 2. Redistributions in binary form must reproduce the above copyright notice,
25 | this list of conditions and the following disclaimer in the documentation
26 | and/or other materials provided with the distribution.
27 |
28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
32 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
38 | THE POSSIBILITY OF SUCH DAMAGE.
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | HistogramLogAnalyzer
2 | ----------------------------------------------
3 |
4 | HistogramLogAnalyzer is a User Interface (UI) tool that plots log files in a histogram log format produced by jHiccup, cassandra-stress, or other tools that support this format.
5 |
6 | How to Build
7 | ----------------------------------------------
8 |
9 | Use Maven to build it from the source code
10 |
11 | % mvn clean package
12 |
13 | How to Run
14 | ----------------------------------------------
15 |
16 | You can run it by using the command line: java -jar HistogramLogAnalyzer.jar or just by double-clicking the jar file.
17 |
18 | Select a log file to plot (by selecting the “File->Open” menu, using the command-line option “-f file”, or just dragging and dropping the log file in the main window).
19 |
20 | Timeline and Percentile Charts
21 | ----------------------------------------------
22 |
23 | The tool produces two charts arranged vertically one above the other:
24 |
25 | - Timeline chart
26 | - Percentile chart
27 |
28 | The timeline chart plots the maximum latency duration observed in each time interval. There is a spike in every recorded sample. The height of each spike indicates the maximum pause time experienced during that interval.
29 |
30 | ![timeline example plot]
31 |
32 | The percentile chart plots the observed latency durations at varying percentiles.
33 |
34 | ![percentile example plot]
35 |
36 | The tool enables viewing SLA (service level agreement) data in the percentile chart. Use the “Master SLA” button in the toolbar to open new tab and configure SLA values (arbitrary number of percentile/latency pairs). Use the “Show SLA” button to display SLA in the percentile chart.
37 |
38 | The tool also enables plotting multiple percentiles and multiple moving window widths on the timeline chart. Use the “Master MWP” button in the toolbar to open a new tab and configure MWP (a multiple window percentile) values (percentile/“window length” pairs). Use the “Show MWP” button to display MWP in the timeline chart.
39 |
40 | Customize Charts
41 | ----------------------------------------------
42 |
43 | The tool provides several options to customize the charts:
44 |
45 | - Chart properties
46 |
47 | Right-click a chart to open a popup menu and then select the “Properties…” menu item to open the "Chart properties" dialog. This dialog allows you to customize different chart settings (titles, fonts, colors, etc).
48 |
49 | - Zooming functionality
50 |
51 | To zoom in, left-click inside a chart and drag over an area in the chart
52 | To zoom out, left-click inside a chart and drag outside the chart
53 | When zooming in on a range in the timeline chart, the percentile chart changes to represent only the percentiles in that time range.
54 |
55 | Snapshot
56 | ----------------------------------------------
57 |
58 | The tool also provides a way to make a snapshot image of charts by using the “Snapshot” button in the toolbar.
59 |
60 | Plotting Tags
61 | ----------------------------------------------
62 |
63 | The tool supports log files with multiple tags. It plots multiple tags (with different colors) on the same chart. Clicking a tag item in the chart legend toggles visibility of this tag in the chart.
64 |
65 | [timeline example plot]:https://raw.github.com/HdrHistogram/HistogramLogAnalyzer/master/examples/screenshots/exampleTimelinePlot.png "Example timeline plot"
66 | [percentile example plot]:https://raw.github.com/HdrHistogram/HistogramLogAnalyzer/master/examples/screenshots/examplePercentilePlot.png "Example timeline plot"
67 |
--------------------------------------------------------------------------------
/examples/screenshots/examplePercentilePlot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HdrHistogram/HistogramLogAnalyzer/df5c6009e477e72afcfad60f84a72b253f4ebc80/examples/screenshots/examplePercentilePlot.png
--------------------------------------------------------------------------------
/examples/screenshots/exampleTimelinePlot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HdrHistogram/HistogramLogAnalyzer/df5c6009e477e72afcfad60f84a72b253f4ebc80/examples/screenshots/exampleTimelinePlot.png
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | org.hdrhistogram.histogramloganalyzer
6 | HistogramLogAnalyzer
7 | 1.0.4-SNAPSHOT
8 |
9 | HistogramLogAnalyzer
10 |
11 |
12 |
13 |
14 | * This code was Written by Azul Systems, and released to the
15 | * public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/
16 |
17 | Public Domain, per Creative Commons CC0
18 | http://creativecommons.org/publicdomain/zero/1.0/
19 |
20 |
21 |
22 |
23 | scm:git:git://github.com/HdrHistogram/HistogramLogAnalyzer.git
24 | scm:git:git://github.com/HdrHistogram/HistogramLogAnalyzer.git
25 | scm:git:git@github.com:HdrHistogram/HistogramLogAnalyzer.git
26 | HistogramLogAnalyzer-1.0.1
27 |
28 |
29 |
30 | https://github.com/HdrHistogram/HistogramLogAnalyzer/issues
31 | GitHub Issues
32 |
33 |
34 | jar
35 |
36 |
37 | UTF-8
38 | src/main/java/org/HdrHistogram/HistogramLogAnalyzer/applicationlayer/Version.java.template
39 | src/main/java/org/HdrHistogram/HistogramLogAnalyzer/applicationlayer/Version.java
40 | org.HdrHistogram.HistogramLogAnalyzer.applicationlayer.Application
41 | dd-MMM-yyyy HH:mm:ss z
42 |
43 |
44 |
45 |
46 |
47 | org.jfree
48 | jfreechart
49 | 1.0.17
50 |
51 |
52 |
53 | org.hdrhistogram
54 | HdrHistogram
55 | 2.1.11
56 |
57 |
58 |
59 | org.xerial
60 | sqlite-jdbc
61 | 3.41.2.2
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | org.apache.maven.plugins
71 | maven-compiler-plugin
72 | 2.3.2
73 |
74 | 1.7
75 | 1.7
76 | UTF-8
77 |
78 |
79 |
80 |
81 | org.apache.maven.plugins
82 | maven-shade-plugin
83 | 2.4.3
84 |
85 |
86 | package
87 |
88 | shade
89 |
90 |
91 |
92 |
93 |
94 | ${main.class}
95 | ${project.name}
96 | ${project.version}
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | org.apache.maven.plugins
107 | maven-release-plugin
108 | 2.5
109 |
110 |
111 |
112 | com.google.code.maven-replacer-plugin
113 | maven-replacer-plugin
114 | 1.4.0
115 |
116 |
117 | process-sources
118 |
119 | replace
120 |
121 |
122 |
123 |
124 | ${version.template.file}
125 | ${version.file}
126 |
127 |
128 | \$BUILD_TIME\$
129 | ${maven.build.timestamp}
130 |
131 |
132 | \$VERSION\$
133 | ${project.version}
134 |
135 |
136 |
137 |
138 |
139 |
140 | maven-assembly-plugin
141 | 2.4
142 |
143 |
144 | src/main/assembly/dist.xml
145 |
146 |
147 |
148 |
149 | package
150 |
151 | single
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
--------------------------------------------------------------------------------
/src/main/assembly/dist.xml:
--------------------------------------------------------------------------------
1 |
3 | dist
4 |
5 | tar.gz
6 | zip
7 |
8 |
9 |
10 | ${project.basedir}
11 | /
12 |
13 | COPYING.txt
14 | LICENSE.txt
15 | README.md
16 | pom.xml
17 |
18 |
19 |
20 | ${project.build.directory}
21 | /
22 |
23 | HistogramLogAnalyzer*.jar
24 |
25 |
26 |
27 | ${project.basedir}/src
28 | /src
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/main/java/org/HdrHistogram/HistogramLogAnalyzer/applicationlayer/AboutDialog.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Written by Azul Systems, and released to the public domain,
3 | * as explained at http://creativecommons.org/publicdomain/zero/1.0/
4 | */
5 |
6 | package org.HdrHistogram.HistogramLogAnalyzer.applicationlayer;
7 |
8 | import java.io.BufferedReader;
9 | import java.io.InputStream;
10 | import java.io.InputStreamReader;
11 |
12 | import javax.swing.JComponent;
13 | import javax.swing.JDialog;
14 | import javax.swing.JEditorPane;
15 | import javax.swing.JFrame;
16 | import javax.swing.JScrollPane;
17 |
18 |
19 | public class AboutDialog extends JDialog {
20 |
21 | private static String _azulCopyrightString = "Copyright 2016, Azul Systems, Inc. All Rights Reserved.";
22 | private static String _licenseFilename = "/org/HdrHistogram/HistogramLogAnalyzer/applicationlayer/License.html";
23 |
24 | /**
25 | * @param parentFrame
26 | */
27 | public AboutDialog(JFrame parentFrame) {
28 | super(parentFrame);
29 |
30 | super.setSize(Math.max((int)(parentFrame.getWidth() * 0.6), 400), Math.max((int)(parentFrame.getHeight() * 0.6), 400));
31 | super.setModal(true);
32 | super.setLocationRelativeTo(parentFrame);
33 | super.setTitle("Help About Histogram Log Analyzer");
34 | super.getContentPane().add(getMainPane());
35 | }
36 |
37 | /**
38 | * @return
39 | */
40 | private JComponent getMainPane() {
41 | JEditorPane editorPane = new JEditorPane();
42 | editorPane.setContentType("text/html");
43 | editorPane.setEditable(false);
44 | editorPane.setText(getAboutText());
45 | editorPane.setCaretPosition(0);
46 | JScrollPane pane = new JScrollPane(editorPane, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
47 | return pane;
48 | }
49 |
50 | private String getAboutText() {
51 | StringBuilder sb = new StringBuilder(1000);
52 | sb.append("");
53 | sb.append("