зеркало из https://github.com/microsoft/gctoolkit.git
Merge branch 'main' of github.com:microsoft/gctoolkit
This commit is contained in:
Коммит
5b52d1df5d
|
@ -11,8 +11,10 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [11, 17]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -24,10 +26,10 @@ jobs:
|
|||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-m2
|
||||
|
||||
- name: Set up JDK 11
|
||||
- name: Set up JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
java-version: ${{ matrix.java }}
|
||||
distribution: 'adopt'
|
||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||
|
|
|
@ -23,8 +23,8 @@ public class GCLogTrace extends AbstractLogTrace {
|
|||
|
||||
private static final Logger LOGGER = Logger.getLogger(GCLogTrace.class.getName());
|
||||
|
||||
private final boolean gcCauseDebugging = "true".equalsIgnoreCase(System.getProperty("microsoft.debug.gccause", "false"));
|
||||
private final boolean debugging = "true".equalsIgnoreCase(System.getProperty("microsoft.debug", "false"));
|
||||
private final boolean gcCauseDebugging = Boolean.getBoolean("microsoft.debug.gccause");
|
||||
private final boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
|
||||
public GCLogTrace(Matcher matcher) {
|
||||
super(matcher);
|
||||
|
|
|
@ -71,8 +71,8 @@ public class GenerationalHeapParser extends PreUnifiedGCLogParser implements Sim
|
|||
private int numberOfBlocksForwardReference;
|
||||
private long averageBlockSizeForwardReference;
|
||||
private int treeHeightForwardReference;
|
||||
private final boolean debugging = ("true".equals(System.getProperty("microsoft.debug", "false").toLowerCase()));
|
||||
private final boolean develop = ("true".equals(System.getProperty("microsoft.develop", "false").toLowerCase()));
|
||||
private final boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
private final boolean develop = Boolean.getBoolean("microsoft.develop");
|
||||
|
||||
//Expect Remark
|
||||
private boolean expectRemark = false;
|
||||
|
@ -2032,8 +2032,7 @@ public class GenerationalHeapParser extends PreUnifiedGCLogParser implements Sim
|
|||
}
|
||||
|
||||
public void logMissedFirstRecordForEvent(String line) {
|
||||
LOGGER.log(Level.WARNING, "Missing initial reco" +
|
||||
"rd for: {0}", line);
|
||||
LOGGER.log(Level.WARNING, "Missing initial record for: {0}", line);
|
||||
}
|
||||
|
||||
public void record(JVMEvent event, boolean clear) {
|
||||
|
|
|
@ -48,7 +48,7 @@ import java.util.logging.Logger;
|
|||
public class PreUnifiedG1GCParser extends PreUnifiedGCLogParser implements G1GCPatterns {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(PreUnifiedG1GCParser.class.getName());
|
||||
private boolean debugging = "true".equalsIgnoreCase(System.getProperty("microsoft.debug", "false"));
|
||||
private boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
|
||||
//values show up at the end of GC log file from a normally terminated JVM
|
||||
private long heapTotal, heapUsed;
|
||||
|
|
|
@ -30,8 +30,8 @@ public class ShenandoahParser extends UnifiedGCLogParser implements ShenandoahPa
|
|||
|
||||
private static final Logger LOGGER = Logger.getLogger(ShenandoahParser.class.getName());
|
||||
|
||||
private final boolean debugging = ("true".equals(System.getProperty("microsoft.debug", "false").toLowerCase()));
|
||||
private final boolean develop = ("true".equals(System.getProperty("microsoft.develop", "false").toLowerCase()));
|
||||
private final boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
private final boolean develop = Boolean.getBoolean("microsoft.develop");
|
||||
|
||||
private final MRUQueue<GCParseRule, BiConsumer<GCLogTrace, String>> parseRules;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import static com.microsoft.gctoolkit.event.GarbageCollectionTypes.fromLabel;
|
|||
public class UnifiedG1GCParser extends UnifiedGCLogParser implements UnifiedG1GCPatterns {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(UnifiedG1GCParser.class.getName());
|
||||
private boolean debugging = "true".equalsIgnoreCase(System.getProperty("microsoft.debug", "false"));
|
||||
private boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
|
||||
private final Map<Integer, G1GCForwardReference> collectionsUnderway = new ConcurrentHashMap<>();
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.logging.Logger;
|
|||
abstract class UnifiedGCLogParser extends GCLogParser {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(UnifiedGCLogParser.class.getName());
|
||||
private static final boolean DEBUG = Boolean.getBoolean("microsoft.debug");
|
||||
|
||||
UnifiedGCLogParser(LoggingDiary diary, JVMEventConsumer consumer) {
|
||||
super(diary, consumer);
|
||||
|
@ -34,7 +35,7 @@ abstract class UnifiedGCLogParser extends GCLogParser {
|
|||
* Some log entries require no actions
|
||||
*/
|
||||
void noop() {
|
||||
if (System.getProperty("microsoft.debug").equalsIgnoreCase("true"))
|
||||
if (DEBUG)
|
||||
System.out.println("noop");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ import static com.microsoft.gctoolkit.event.GarbageCollectionTypes.Remark;
|
|||
public class UnifiedGenerationalParser extends UnifiedGCLogParser implements UnifiedGenerationalPatterns {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(UnifiedGenerationalParser.class.getName());
|
||||
private boolean debugging = "true".equalsIgnoreCase(System.getProperty("microsoft.debug", "false"));
|
||||
private boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
|
||||
private final RuleSet<GCParseRule, BiConsumer<GCLogTrace, String>> parseRules;
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ public class ZGCParser extends UnifiedGCLogParser implements ZGCPatterns {
|
|||
|
||||
private static final Logger LOGGER = Logger.getLogger(ZGCParser.class.getName());
|
||||
|
||||
private final boolean debugging = ("true".equals(System.getProperty("microsoft.debug", "false").toLowerCase()));
|
||||
private final boolean develop = ("true".equals(System.getProperty("microsoft.develop", "false").toLowerCase()));
|
||||
private final boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
private final boolean develop = Boolean.getBoolean("microsoft.develop");
|
||||
|
||||
private final MRUQueue<GCParseRule, BiConsumer<GCLogTrace, String>> parseRules;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public class LogLineFilter {
|
|||
|
||||
static {
|
||||
prefixFilter = System.getProperty(PREFIX_FILTER_PROPERTY);
|
||||
verbose = System.getProperty(VERBOSE_PROPERTY, "false").toLowerCase().equals("true");
|
||||
verbose = Boolean.getBoolean(VERBOSE_PROPERTY);
|
||||
}
|
||||
|
||||
public LogLineFilter() {
|
||||
|
|
|
@ -30,7 +30,7 @@ public class ConcurrentMarkSweepPhaseParserRulesTest implements CMSPatterns {
|
|||
|
||||
/* Code that is useful when testing individual records */
|
||||
|
||||
private final boolean debugging = ("true".equals(System.getProperty("microsoft.debug", "false").toLowerCase()));
|
||||
private final boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
|
||||
@Test
|
||||
public void testDebugCMSParseRules() {
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ParallelParserRulesTest implements ParallelPatterns {
|
|||
|
||||
/* Code that is useful when testing individual records */
|
||||
|
||||
private final boolean debugging = ("true".equals(System.getProperty("microsoft.debug", "true").toLowerCase()));
|
||||
private final boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
|
||||
//@Test
|
||||
public void testDebugParallelParseRules() {
|
||||
|
|
|
@ -31,7 +31,7 @@ public class G1GCPatternsTest implements G1GCPatterns {
|
|||
|
||||
/* Code that is useful when testing individual records */
|
||||
|
||||
// private boolean debugging = ("true".equals(System.getProperty( "microsoft.debug", "false").toLowerCase()));
|
||||
// private boolean debugging = Boolean.getBoolean("microsoft.debug");
|
||||
//
|
||||
// @Test
|
||||
// public void testDebugParallelParseRules() {
|
||||
|
|
|
@ -20,7 +20,7 @@ public class Main {
|
|||
throw new IllegalArgumentException("This sample requires a path to a GC log file.");
|
||||
}
|
||||
|
||||
if (Files.exists(Path.of(gcLogFile)) == false) {
|
||||
if (Files.notExists(Path.of(gcLogFile))) {
|
||||
throw new IllegalArgumentException(String.format("File %s not found.", gcLogFile));
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,6 @@ import com.microsoft.gctoolkit.time.DateTimeStamp;
|
|||
|
||||
public interface HeapOccupancyAfterCollectionAggregation extends Aggregation {
|
||||
|
||||
public void addDataPoint(GarbageCollectionTypes gcType, DateTimeStamp timeStamp, long heapOccupancy);
|
||||
void addDataPoint(GarbageCollectionTypes gcType, DateTimeStamp timeStamp, long heapOccupancy);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Licensed under the MIT License.
|
||||
package com.microsoft.gctoolkit.sample.collections;
|
||||
|
||||
import com.microsoft.gctoolkit.sample.collections.XYDataSet;
|
||||
import com.microsoft.gctoolkit.sample.collections.XYDataSet.Point;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -45,4 +44,4 @@ public class XYDataSetTest {
|
|||
assertTrue(new XYDataSet().maxOfY().isEmpty());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче