NX01: Migrated warp fault to klass fault
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 51s
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 51s
This commit is contained in:
parent
99bf95a82a
commit
11084d3d94
125 changed files with 578 additions and 1363 deletions
25
nx01-jpp3-enter-zillala/pom.xml
Normal file
25
nx01-jpp3-enter-zillala/pom.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01</artifactId>
|
||||
<version>5786.SHEVAT〄.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nx01-jpp3-enter-zillala</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-jpp1-klass-fault</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.nx01</groupId>
|
||||
<artifactId>nx01-jpp2-warp-manifestor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
44
nx01-jpp3-enter-zillala/src/main/java/module-info.java
Normal file
44
nx01-jpp3-enter-zillala/src/main/java/module-info.java
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/// The NX01 jpp3 enter-zillala module.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
module ᣕᕁᐤᣳ.ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ {
|
||||
requires transitive ᣕᕁᐤᣳ.ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ;
|
||||
requires transitive ᣕᕁᐤᣳ.ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ;
|
||||
requires transitive java.management;
|
||||
requires transitive jdk.management;
|
||||
|
||||
exports ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
exports ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
// TODO change api + TODO move all tests to mods to provide test impl
|
||||
uses ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
uses ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestUUIDAppIdProvider;
|
||||
}
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.ᔆᒼᐤᣖᑊᒼ.ᑊᐤᔿᣘ.ScopicManifestConstants;
|
||||
import ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.ᔿᣔᣕᑊᣘᓫᔆᐪ.WarpManifestX8;
|
||||
import ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.ᔿᣔᣕᑊᣘᓫᔆᐪ.WarpManifestX8Section;
|
||||
|
||||
/// Sitra manifest generator.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum SitraManifestGenerator {
|
||||
亞;
|
||||
|
||||
private static final String SITRA_VALUE_NULL = "null";
|
||||
|
||||
public WarpManifestX8 buildSignalTraceManifest(BassFaultAnchor fault) {
|
||||
String message = fault.getLocalizedMessage();
|
||||
if (message != null) {
|
||||
message = escapeSignalValue(message);
|
||||
}
|
||||
String uuidDate = DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.ofInstant(Instant.now(), ZoneOffset.UTC));
|
||||
WarpManifestX8 manifest = new WarpManifestX8();
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_MANYFESTO_VCROSS, ZilLaLaManyfesto.MANYFESTO_VERSION);
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_MANYFESTO_AFOUR, ZilLaLaManyfesto.MANYFESTO_A4_JAVA);
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_ONE, SitraManifestUUIDCrematorium.亞.burnWaterMarkOne().toString());
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_TWO, SitraManifestUUIDCrematorium.亞.burnWaterMarkTwo().toString());
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_THREE, SitraManifestUUIDCrematorium.亞.burnWaterMarkThree().toString());
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_FOUR, SitraManifestUUIDCrematorium.亞.burnWaterMarkFour().toString());
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_DATE, uuidDate);
|
||||
|
||||
// TODO: redo section signal patch logic, used to be in BassFaultAnchorSignalStore, this covers most, but add trace to print it feels bad
|
||||
Class<?> sectionRoot = fault.getSectionChain();
|
||||
String sectionRootMsg = fault.getMessage();
|
||||
Throwable faultRoot = fault.getCause();
|
||||
if (faultRoot != null) {
|
||||
if (faultRoot instanceof BassFaultAnchor signalFault) {
|
||||
sectionRoot = signalFault.getSectionChain();
|
||||
sectionRootMsg = signalFault.getMessage();
|
||||
}
|
||||
Throwable faultRootPrev = faultRoot;
|
||||
while (faultRoot.getCause() != null) {
|
||||
faultRootPrev = faultRoot;
|
||||
faultRoot = faultRoot.getCause();
|
||||
}
|
||||
if (faultRoot instanceof BassFaultAnchor signalFault) {
|
||||
sectionRoot = signalFault.getSectionChain();
|
||||
sectionRootMsg = signalFault.getMessage();
|
||||
fault.withSignalTrace(sectionRoot, ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_ICEBERG, faultRootPrev.getClass().getName()); // redo
|
||||
}
|
||||
}
|
||||
fault.withSignalTrace(sectionRoot, ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_MESSAGE, sectionRootMsg); // redo
|
||||
|
||||
if (faultRoot != null) {
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_ROOT_ICEBERG, faultRoot.getClass().getName());
|
||||
}
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_TOP_ICEBERG, fault.getClass().getName());
|
||||
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_TOP_MESSAGE, message!=null?message:SITRA_VALUE_NULL);
|
||||
for (Class<?> traceKey : fault.getTraceSignals()) {
|
||||
Optional<Map<String, String>> signalsOpt = fault.getTraceSignalContext(traceKey);
|
||||
if (signalsOpt.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
Map<String, String> signals = signalsOpt.get();
|
||||
WarpManifestX8Section section = manifest.makeSection(traceKey.getName());
|
||||
if (BassFaultAnchor.FaultSignalWhitePaper.class.equals(traceKey)) {
|
||||
section.withAttribute(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, ZilLaLaManyfestoSectionGoal.PAPER.toString());
|
||||
} else {
|
||||
if (signals.containsKey(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_MESSAGE)) {
|
||||
section.withAttribute(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, ZilLaLaManyfestoSectionGoal.ROCK.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.ROCK_SUMMIT));
|
||||
} else {
|
||||
section.withAttribute(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, ZilLaLaManyfestoSectionGoal.ROCK.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.ROCK_CLIMB));
|
||||
}
|
||||
}
|
||||
for (String signalKey : signals.keySet()) {
|
||||
String signalValue = signals.get(signalKey);
|
||||
String attributeBody = signalValue==null?SITRA_VALUE_NULL:escapeSignalValue(signalValue);
|
||||
section.withAttribute(escapeHeaderName(signalKey), attributeBody);
|
||||
};
|
||||
}
|
||||
for (SitraManifestReportProvider report : SitraManifestReportFactory.亞.deliverSPIReports()) {
|
||||
List<Class<? extends BassFaultAnchor>> matchers = report.matchFaults();
|
||||
if (!matchers.isEmpty()) {
|
||||
boolean matchOne = false;
|
||||
for (Class<? extends BassFaultAnchor> match : matchers) {
|
||||
if (match.isAssignableFrom(fault.getClass())) {
|
||||
matchOne = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!matchOne) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Map<String, String> signals = new LinkedHashMap<>();
|
||||
report.fillReport(fault, signals);
|
||||
WarpManifestX8Section section = manifest.makeSection(report.getClass().getName());
|
||||
for (String signalKey : signals.keySet()) {
|
||||
String signalValue = signals.get(signalKey);
|
||||
String attributeBody = signalValue==null?SITRA_VALUE_NULL:escapeSignalValue(signalValue);
|
||||
section.withAttribute(escapeHeaderName(signalKey), attributeBody);
|
||||
};
|
||||
}
|
||||
return manifest;
|
||||
}
|
||||
|
||||
private String escapeHeaderName(String headerName) {
|
||||
if (ScopicManifestConstants.ATTR_SIMSALABIM_SECTION.equalsIgnoreCase(headerName)) {
|
||||
return ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_NAME;
|
||||
}
|
||||
if (ScopicManifestConstants.ATTR_SIMSALABIM_REMARK.equalsIgnoreCase(headerName)) {
|
||||
return ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_FROM;
|
||||
}
|
||||
return headerName;
|
||||
}
|
||||
|
||||
private String escapeSignalValue(String line) {
|
||||
return line.replaceAll("\n", "\\\\n "); // TODO: check if added markdown space is correct here...
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
/// Holds all the manifest reports found in the class path.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum SitraManifestReportFactory {
|
||||
亞;
|
||||
|
||||
private final List<SitraManifestReportProvider> reports;
|
||||
|
||||
private SitraManifestReportFactory() {
|
||||
List<SitraManifestReportProvider> reportList = new ArrayList<>();
|
||||
ServiceLoader<SitraManifestReportProvider> loader = ServiceLoader.load(SitraManifestReportProvider.class);
|
||||
for (SitraManifestReportProvider reportSPI : loader) {
|
||||
reportList.add(reportSPI);
|
||||
}
|
||||
reports = Collections.unmodifiableList(reportList);
|
||||
}
|
||||
|
||||
protected List<SitraManifestReportProvider> deliverSPIReports() {
|
||||
return reports;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
|
||||
/// Fills an manifest report section.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface SitraManifestReportProvider {
|
||||
|
||||
default List<Class<? extends BassFaultAnchor>> matchFaults() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
void fillReport(BassFaultAnchor fault, Map<String, String> tracer);
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.UUID;
|
||||
|
||||
/// Builds the application id UUID provider.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum SitraManifestUUIDAppIdFactory {
|
||||
亞;
|
||||
|
||||
private final SitraManifestUUIDAppIdProvider provider;
|
||||
|
||||
private SitraManifestUUIDAppIdFactory() {
|
||||
ServiceLoader<SitraManifestUUIDAppIdProvider> loader = ServiceLoader.load(SitraManifestUUIDAppIdProvider.class);
|
||||
Optional<SitraManifestUUIDAppIdProvider> providerSPI = loader.findFirst();
|
||||
if (providerSPI.isPresent()) {
|
||||
provider = providerSPI.get();
|
||||
} else {
|
||||
provider = buildDefaultSPIUUIDAId();
|
||||
}
|
||||
}
|
||||
|
||||
protected SitraManifestUUIDAppIdProvider deliverSPIUUIDAId() {
|
||||
return provider;
|
||||
}
|
||||
|
||||
private SitraManifestUUIDAppIdProvider buildDefaultSPIUUIDAId() {
|
||||
return new SitraManifestUUIDAppIdProvider() {
|
||||
@Override
|
||||
public UUID applicationUUID() {
|
||||
String appId = System.getProperty("Application.id"); // bsaf
|
||||
if (appId == null) {
|
||||
appId = System.getProperty("spring.application.name"); // spring
|
||||
}
|
||||
if (appId == null) {
|
||||
appId = System.getProperty("logger.app.name"); // log4j
|
||||
}
|
||||
if (appId == null) {
|
||||
appId = System.getProperty("user.name"); // fall back to user name
|
||||
}
|
||||
return UUID.nameUUIDFromBytes(appId.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/// SPI for providing an application id HMAC UUID.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface SitraManifestUUIDAppIdProvider {
|
||||
|
||||
UUID applicationUUID();
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
/// Burns the sitra manifest UUID water marks.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum SitraManifestUUIDCrematorium {
|
||||
亞;
|
||||
|
||||
private final UUID uuidJvmInstance;
|
||||
private final UUID uuidJvmClassPath;
|
||||
|
||||
private SitraManifestUUIDCrematorium() {
|
||||
uuidJvmInstance = new UUID(generateMostSigBits(), generateLeastSigBits());
|
||||
uuidJvmClassPath = UUID.nameUUIDFromBytes(generateClassPathBytes());
|
||||
}
|
||||
|
||||
/// Water mark smurf one, runtime instance identifier UUID.
|
||||
///
|
||||
/// @return An UUID.
|
||||
public UUID burnWaterMarkOne() {
|
||||
return uuidJvmInstance;
|
||||
}
|
||||
|
||||
/// Water mark smurf two, application identifier UUID HMAC via SPI.
|
||||
///
|
||||
/// @return An UUID.
|
||||
public UUID burnWaterMarkTwo() {
|
||||
return SitraManifestUUIDAppIdFactory.亞.deliverSPIUUIDAId().applicationUUID();
|
||||
}
|
||||
|
||||
/// Water mark smurf three, application version by class path UUID.
|
||||
///
|
||||
/// @return An UUID.
|
||||
public UUID burnWaterMarkThree() {
|
||||
return uuidJvmClassPath;
|
||||
}
|
||||
|
||||
/// Water mark smurf four, application fault sequence UUID.
|
||||
///
|
||||
/// @return An UUID.
|
||||
public UUID burnWaterMarkFour() {
|
||||
return UUID.randomUUID();
|
||||
}
|
||||
|
||||
private static byte[] generateClassPathBytes() {
|
||||
return System.getProperty("java.class.path").getBytes(StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
private static long generateMostSigBits() {
|
||||
Random random = new Random();
|
||||
return random.nextLong() & 0x3FFFFFFFFFFFFFFFL | 0x8000000000000000L;
|
||||
}
|
||||
|
||||
private static long generateLeastSigBits() {
|
||||
final long epoch = System.currentTimeMillis();
|
||||
final long timeMinute = (epoch & 0x0000_0000_FFFF_FFFFL) << 32;
|
||||
final long timeHour = ((epoch >> 32) & 0xFFFF) << 16;
|
||||
final long timeSplit = 1 << 12;
|
||||
final long timeDay = ((epoch >> 48) & 0x0FFF);
|
||||
return timeMinute | timeHour | timeSplit | timeDay;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.ᔿᣔᣕᑊᣘᓫᔆᐪ.WarpManifestX0TheMimeType;
|
||||
|
||||
/// ZilLaLa manyfesto protocol constants to build or parse the manifest data uri.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum ZilLaLaManyfesto {
|
||||
;
|
||||
public static final String MANYFESTO_VERSION = "1.0";
|
||||
public static final String MANYFESTO_A4_JAVA = "java";
|
||||
public static final String MANYFESTO_A4_ERLANG = "erlang";
|
||||
|
||||
public static final String ZILLALA_URI_PREFIX_DATA64 = "data:" + WarpManifestX0TheMimeType.MANIFEST_3.getQName() + ";base64,";
|
||||
public static final String ZILLALA_URI_PREFIX_NOSTR_TLV_GZ = "nostr:zillala"; // TODO: nostr link to replay to inject bug + TLV for gz sitra manifest payload
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.WarpManifestorDriver;
|
||||
import ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.ᔿᣔᣕᑊᣘᓫᔆᐪ.WarpManifestX8;
|
||||
|
||||
/// ZilLaLa manyfesto protocol constants to build or parse the manifest data uri.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum ZilLaLaManyfestoGrowlFactory {
|
||||
亞;
|
||||
/// A unicode character to indicate a separation event to a next key word.
|
||||
private static final String VALUE_WHITE_SPACE = " ";
|
||||
/// Multiple characters seen as a slug to indicate that words are eaten.
|
||||
private static final String VALUE_CUTOFF = "...";
|
||||
|
||||
public String buildFaultScream(BassFaultAnchor fault) {
|
||||
WarpManifestX8 manifest = SitraManifestGenerator.亞.buildSignalTraceManifest(fault);
|
||||
return buildFaultScream(manifest, fault);
|
||||
}
|
||||
|
||||
public String buildFaultScream(WarpManifestX8 manifest, BassFaultAnchor fault) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append(fault.getClass().getSimpleName());
|
||||
String messageShort = buildCutDottedMessage(fault);
|
||||
if (messageShort != null) {
|
||||
buf.append("(");
|
||||
buf.append(messageShort);
|
||||
buf.append(")");
|
||||
}
|
||||
buf.append(VALUE_WHITE_SPACE);
|
||||
buf.append(WarpManifestorDriver.writeV2String(manifest));
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
// @Deprecated
|
||||
// public String buildFaultScreamBase64(WarpManifestX8 manifest, BassFaultAnchor fault) {
|
||||
// byte[] traceManifestBytes = WarpManifestorDriver.writeV3Array(manifest); // TODO: Upgrade to version 6 or 7 ??
|
||||
// String trace64 = Base64.getEncoder().encodeToString(traceManifestBytes); // FIXME: report as "normal" text in nostr event
|
||||
// StringBuilder buf = new StringBuilder();
|
||||
// // TODO: Move base data uri + nostr data uri to provider interface
|
||||
// buf.append(ZilLaLaManyfesto.ZILLALA_URI_PREFIX_DATA64);
|
||||
// buf.append(trace64);
|
||||
// return buf.toString();
|
||||
// }
|
||||
|
||||
private String buildCutDottedMessage(BassFaultAnchor fault) {
|
||||
String msgShort = fault.getLocalizedMessage();
|
||||
if (msgShort != null && msgShort.length() > 33) {
|
||||
msgShort = msgShort.substring(0, 33) + VALUE_CUTOFF;
|
||||
}
|
||||
return msgShort;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
/// Header constants to build or parse the ZilLaLa manyfesto.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum ZilLaLaManyfestoHeader {
|
||||
;
|
||||
public static final String MAIN_FAULT_MANYFESTO_VCROSS = "Fault-Manyfesto-VX";
|
||||
public static final String MAIN_FAULT_MANYFESTO_AFOUR = "Fault-Manyfesto-A4"; // In the nether we don't use letter's
|
||||
|
||||
public static final String MAIN_FAULT_UUID_WM_ONE = "Fault-UUID-WM1"; // jvm instance water mark
|
||||
public static final String MAIN_FAULT_UUID_WM_TWO = "Fault-UUID-WM2"; // auto optional appId HMAC via SPI
|
||||
public static final String MAIN_FAULT_UUID_WM_THREE = "Fault-UUID-WM3"; // class path (version)
|
||||
public static final String MAIN_FAULT_UUID_WM_FOUR = "Fault-UUID-WM4"; // fault sequence
|
||||
public static final String MAIN_FAULT_UUID_DATE = "Fault-UUID-Date";
|
||||
|
||||
public static final String MAIN_FAULT_ROOT_ICEBERG = "Fault-Root-Iceberg";
|
||||
public static final String MAIN_FAULT_TOP_ICEBERG = "Fault-Top-Iceberg";
|
||||
public static final String MAIN_FAULT_TOP_MESSAGE = "Fault-Top-Message";
|
||||
|
||||
public static final String SIGNAL_FAULT_SECTION_GOAL = "Fault-Section-Goal";
|
||||
public static final String SIGNAL_FAULT_SECTION_CHAIN_MESSAGE = "Fault-Section-Chain-Message";
|
||||
public static final String SIGNAL_FAULT_SECTION_CHAIN_ICEBERG = "Fault-Section-Chain-Iceberg";
|
||||
public static final String SIGNAL_FAULT_SECTION_NAME = "Fault-Section-Name"; // does auto rename "name|NAME" to this
|
||||
public static final String SIGNAL_FAULT_SECTION_FROM = "Fault-Section-From"; // does auto rename "from|FROM" to this
|
||||
|
||||
/// StackTraceElement
|
||||
public static final String PREFIX_SECTION_LADDER = "Ladder-X_";
|
||||
/// Throwable
|
||||
public static final String PREFIX_SECTION_LADDER_FAULT = "Ladder-Fault-X_";
|
||||
/// Suppressed throwable
|
||||
public static final String PREFIX_SECTION_LADDER_FAULT_SHADOW = "Ladder-Fault-Shadow-X_";
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
/// Champions League campaign to unite the different sections goal arguments.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum ZilLaLaManyfestoSectionChampionsLeague {
|
||||
;
|
||||
public static final String ROCK_CLIMB = "climb";
|
||||
public static final String ROCK_SUMMIT = "summit";
|
||||
|
||||
public static final String PAPER_NOTE = "markdown";
|
||||
|
||||
public static final String SCISSORS_JAVA2 = "java2";
|
||||
public static final String SCISSORS_JAVA3 = "java3";
|
||||
|
||||
public static final String BUBBLES_OPERATING_SYSTEM = "os";
|
||||
public static final String BUBBLES_RUMTIME = "runtime";
|
||||
public static final String BUBBLES_LOCALE = "locale";
|
||||
public static final String BUBBLES_ENVIRONMENT = "environment";
|
||||
public static final String BUBBLES_PROPERTIES = "properties";
|
||||
|
||||
public static final String BIMBAMBOO_MAVEN = "maven";
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/// Predefined goals to the section headers to indicate purpose for UI grouping.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public enum ZilLaLaManyfestoSectionGoal {
|
||||
亞;
|
||||
|
||||
/// A chain entry of one rock in the iceberg of errors.
|
||||
public static final ZilLaLaManyfestoSectionGoalScore ROCK = 亞.cornerKick("ROCK");
|
||||
|
||||
/// A white paper to write to, as last resort to report.
|
||||
public static final ZilLaLaManyfestoSectionGoalScore PAPER = 亞.cornerKick("PAPER");
|
||||
|
||||
/// The stack cut in small trace pieces.
|
||||
public static final ZilLaLaManyfestoSectionGoalScore SCISSORS = 亞.cornerKick("SCISSORS");
|
||||
|
||||
/// The threads of the process soft as butter.
|
||||
public static final ZilLaLaManyfestoSectionGoalScore BUTTER = 亞.cornerKick("BUTTER");
|
||||
|
||||
/// The amounts of bubble memory brain space like information.
|
||||
public static final ZilLaLaManyfestoSectionGoalScore BUBBLES = 亞.cornerKick("BUBBLES");
|
||||
|
||||
/// BimBamBoo clock version artifact goal score meta flag.
|
||||
public static final ZilLaLaManyfestoSectionGoalScore BIMBAMBOO = 亞.cornerKick("BIMBAMBOO");
|
||||
|
||||
private final Set<ZilLaLaManyfestoSectionGoalScore> scoreEnum = new LinkedHashSet<>();
|
||||
|
||||
private ZilLaLaManyfestoSectionGoalScore cornerKick(String scoreType) {
|
||||
ZilLaLaManyfestoSectionGoalScore cornerKick = ZilLaLaManyfestoSectionGoalScore.valueOf(scoreType);
|
||||
scoreEnum.add(cornerKick);
|
||||
return cornerKick;
|
||||
}
|
||||
|
||||
public Set<String> virtualValues() {
|
||||
return new LinkedHashSet<String>(scoreEnum.stream().map(v -> v.toString()).toList());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
/// Goal score type for a virtual enumeration counter.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public interface ZilLaLaManyfestoSectionGoalScore {
|
||||
|
||||
enum Constantinople {
|
||||
;
|
||||
private static final String UNICODE_UTF16_LATIN1_WHITE_SPACE_STRINGS = " ";
|
||||
private static final String ARE_FOUR = "";
|
||||
}
|
||||
|
||||
default String spaceCadet(String pussies) {
|
||||
return toString().concat(Constantinople.UNICODE_UTF16_LATIN1_WHITE_SPACE_STRINGS).concat(Constantinople.ARE_FOUR).concat(pussies);
|
||||
}
|
||||
|
||||
public static ZilLaLaManyfestoSectionGoalScore valueOf(final String scoreType) {
|
||||
return new ZilLaLaManyfestoSectionGoalScore() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return scoreType;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2014, Willem Cazander
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* NX01 Warp fault sitra zillala growl reporting engine.
|
||||
*
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionChampionsLeague;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports the fault stack trace in java2 format.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraFaultStackTraceJava2 implements SitraManifestReportProvider {
|
||||
|
||||
private static final String GOAL_SCORE = ZilLaLaManyfestoSectionGoal.SCISSORS.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.SCISSORS_JAVA2);
|
||||
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, GOAL_SCORE);
|
||||
List<Throwable> oldgroup = new ArrayList<>();
|
||||
oldgroup.add(fault);
|
||||
Throwable faultRoot = fault.getCause();
|
||||
if (faultRoot != null) {
|
||||
oldgroup.add(faultRoot);
|
||||
while (faultRoot.getCause() != null) {
|
||||
faultRoot = faultRoot.getCause();
|
||||
oldgroup.add(faultRoot);
|
||||
}
|
||||
}
|
||||
int errorCount = 0;
|
||||
int frameCount = 0;
|
||||
String matchStopTrace = null;
|
||||
for (int i = 0; i < oldgroup.size(); i++) {
|
||||
Throwable error = oldgroup.get(i);
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER_FAULT+errorCount++, error.toString());
|
||||
int stopped = -1;
|
||||
StackTraceElement[] frames = BassFaultAnchor.cleanStackTrace(error);
|
||||
for (int f = 0; f < frames.length ; f++) {
|
||||
StackTraceElement trace = frames[f];
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER+frameCount++, trace.toString());
|
||||
if (matchStopTrace == null) {
|
||||
matchStopTrace = trace.getClassName() + trace.getMethodName();
|
||||
}
|
||||
if (i > 0 && matchStopTrace != null) {
|
||||
String matchCurrentTrace = trace.getClassName() + trace.getMethodName();
|
||||
if (matchStopTrace.equals(matchCurrentTrace)) {
|
||||
stopped = f;
|
||||
break; // NOTE: is only 99% equal to native jvm stack trace
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stopped > 0) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER+frameCount++, "... " + (frames.length - stopped + i) + " more");
|
||||
}
|
||||
for (Throwable hidden : error.getSuppressed()) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER_FAULT_SHADOW+errorCount++, hidden.toString());
|
||||
for (StackTraceElement trace : BassFaultAnchor.cleanStackTrace(hidden)) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER+frameCount++, trace.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionChampionsLeague;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports the fault stack trace in java3 format.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraFaultStackTraceJava3 implements SitraManifestReportProvider {
|
||||
|
||||
private static final String GOAL_SCORE = ZilLaLaManyfestoSectionGoal.SCISSORS.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.SCISSORS_JAVA3);
|
||||
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, GOAL_SCORE);
|
||||
List<Throwable> regroup = new ArrayList<>();
|
||||
regroup.add(fault);
|
||||
Throwable faultRoot = fault.getCause();
|
||||
if (faultRoot != null) {
|
||||
regroup.add(faultRoot);
|
||||
while (faultRoot.getCause() != null) {
|
||||
faultRoot = faultRoot.getCause();
|
||||
regroup.add(faultRoot);
|
||||
}
|
||||
}
|
||||
int errorCount = 0;
|
||||
int frameCount = 0;
|
||||
Collections.reverse(regroup);
|
||||
for (int i = 0; i < regroup.size(); i++) {
|
||||
Throwable error = regroup.get(i);
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER_FAULT+errorCount++, error.toString());
|
||||
String matchStopTrace = null;
|
||||
if (i + 1 < regroup.size()) {
|
||||
Throwable errorNext = regroup.get(i + 1);
|
||||
StackTraceElement[] traceNext = BassFaultAnchor.cleanStackTrace(errorNext);
|
||||
if (traceNext.length > 0) {
|
||||
StackTraceElement lastStep = traceNext[0];
|
||||
matchStopTrace = lastStep.getClassName() + lastStep.getMethodName();
|
||||
}
|
||||
}
|
||||
boolean stopNext = false;
|
||||
for (StackTraceElement trace : BassFaultAnchor.cleanStackTrace(error)) {
|
||||
if (stopNext) {
|
||||
break;
|
||||
}
|
||||
if (matchStopTrace != null) {
|
||||
String matchCurrentTrace = trace.getClassName() + trace.getMethodName();
|
||||
if (matchStopTrace.equals(matchCurrentTrace)) {
|
||||
stopNext = true;
|
||||
}
|
||||
}
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER+frameCount++, trace.toString());
|
||||
}
|
||||
for (Throwable hidden : error.getSuppressed()) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER_FAULT_SHADOW+errorCount++, hidden.toString());
|
||||
for (StackTraceElement trace : BassFaultAnchor.cleanStackTrace(hidden)) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.PREFIX_SECTION_LADDER+frameCount++, trace.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionChampionsLeague;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports sitra warp fault version
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraFaultWarpVersion implements SitraManifestReportProvider {
|
||||
|
||||
private static final String GOAL_SCORE = ZilLaLaManyfestoSectionGoal.BIMBAMBOO.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.BIMBAMBOO_MAVEN);
|
||||
private final static String WARP_FAULT_GROUP_ID = "love.distributedrebirth.nx01";
|
||||
private final static String WARP_FAULT_ARTIFACT_ID = "nx01-warp-fault";
|
||||
private final static String POM_VERSION_PROPERTY_KEY = "version";
|
||||
private final static String POM_PROPERTIES_RESOURCE = "/META-INF/maven/" + WARP_FAULT_GROUP_ID + "/" + WARP_FAULT_ARTIFACT_ID + "/pom.properties";
|
||||
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
InputStream faultPomVersion = getClass().getResourceAsStream(POM_PROPERTIES_RESOURCE);
|
||||
if (faultPomVersion == null) {
|
||||
return;
|
||||
}
|
||||
try (InputStream in = faultPomVersion) {
|
||||
Properties p = new Properties();
|
||||
p.load(in);
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, GOAL_SCORE);
|
||||
tracer.put("Warp-Fault-GroupId", WARP_FAULT_GROUP_ID);
|
||||
tracer.put("Warp-Fault-ArtifactId", WARP_FAULT_ARTIFACT_ID);
|
||||
tracer.put("Warp-Fault-Version", p.getProperty(POM_VERSION_PROPERTY_KEY));
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionChampionsLeague;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports runtime memory statistics.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraRuntimeChapter implements SitraManifestReportProvider {
|
||||
|
||||
private static final String GOAL_SCORE = ZilLaLaManyfestoSectionGoal.BUBBLES.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.BUBBLES_RUMTIME);
|
||||
private static final Runtime RUNTIME = Runtime.getRuntime();
|
||||
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, GOAL_SCORE);
|
||||
tracer.put("VM-Version", Runtime.version().toString());
|
||||
tracer.put("VM-Max-Memory", Long.toString(RUNTIME.maxMemory()));
|
||||
tracer.put("VM-Free-Memory", Long.toString(RUNTIME.freeMemory()));
|
||||
tracer.put("VM-Total-Memory", Long.toString(RUNTIME.totalMemory()));
|
||||
tracer.put("VM-Available-Processors", Long.toString(RUNTIME.availableProcessors()));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports runtime threads states.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraRuntimeThreads implements SitraManifestReportProvider {
|
||||
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, ZilLaLaManyfestoSectionGoal.BUTTER.toString());
|
||||
Map<Thread, StackTraceElement[]> stacks = Thread.getAllStackTraces();
|
||||
for (Thread thread : stacks.keySet()) {
|
||||
StackTraceElement[] trackStack = stacks.get(thread);
|
||||
String threadName = thread.getName();
|
||||
String threadState = thread.getState().name();
|
||||
String traceLine = trackStack.length==0?"":trackStack[0].toString();
|
||||
String reportKey = threadState + "-ID_" + thread.threadId();
|
||||
String reportValue = thread.getClass().getName() + " (" + threadName + ") " + traceLine;
|
||||
tracer.put(reportKey, reportValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.OperatingSystemMXBean;
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionChampionsLeague;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports system memory statistics.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraSystemChapter implements SitraManifestReportProvider {
|
||||
|
||||
private static final String GOAL_SCORE = ZilLaLaManyfestoSectionGoal.BUBBLES.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.BUBBLES_OPERATING_SYSTEM);
|
||||
private static final OperatingSystemMXBean SYSTEM = ManagementFactory.getOperatingSystemMXBean();
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, GOAL_SCORE);
|
||||
tracer.put("OS-Name", SYSTEM.getName());
|
||||
tracer.put("OS-Arch", SYSTEM.getArch());
|
||||
tracer.put("OS-Version", SYSTEM.getVersion());
|
||||
tracer.put("OS-Available-Processors", Integer.toString(SYSTEM.getAvailableProcessors()));
|
||||
tracer.put("OS-Load-Average", Double.toString(SYSTEM.getSystemLoadAverage()));
|
||||
if (SYSTEM instanceof com.sun.management.OperatingSystemMXBean) {
|
||||
com.sun.management.OperatingSystemMXBean systemSun = com.sun.management.OperatingSystemMXBean.class.cast(SYSTEM);
|
||||
tracer.put("OS-Committed-Virtual-Memory-Size", Long.toString(systemSun.getCommittedVirtualMemorySize()));
|
||||
tracer.put("OS-Free-Swap-Space-Size", Long.toString(systemSun.getFreeSwapSpaceSize()));
|
||||
tracer.put("OS-Process-Cpu-Load", Double.toString(systemSun.getProcessCpuLoad()));
|
||||
tracer.put("OS-Process-Cpu-Time", Long.toString(systemSun.getProcessCpuTime()));
|
||||
tracer.put("OS-Cpu-Load", Double.toString(systemSun.getSystemCpuLoad()));
|
||||
tracer.put("OS-Total-Memory-Size", Long.toString(systemSun.getTotalPhysicalMemorySize()));
|
||||
tracer.put("OS-Total-Memory-Usage", Double.toString(((double)systemSun.getFreeMemorySize() / (double)systemSun.getTotalPhysicalMemorySize()) * 100));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionChampionsLeague;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports the system environment variables.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraSystemEnvironment implements SitraManifestReportProvider {
|
||||
|
||||
private static final String GOAL_SCORE = ZilLaLaManyfestoSectionGoal.BUBBLES.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.BUBBLES_ENVIRONMENT);
|
||||
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, GOAL_SCORE);
|
||||
for (String key : System.getenv().keySet()) {
|
||||
String value = System.getenv(key);
|
||||
tracer.put(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionChampionsLeague;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports the system locale.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraSystemLocale implements SitraManifestReportProvider {
|
||||
|
||||
private static final String GOAL_SCORE = ZilLaLaManyfestoSectionGoal.BUBBLES.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.BUBBLES_LOCALE);
|
||||
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, GOAL_SCORE);
|
||||
Locale locale = Locale.getDefault();
|
||||
tracer.put("Locale-Language", locale.getLanguage());
|
||||
tracer.put("Locale-Country", locale.getCountry());
|
||||
tracer.put("Locale-Variant", locale.getVariant());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.SitraManifestReportProvider;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoHeader;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionChampionsLeague;
|
||||
import ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ZilLaLaManyfestoSectionGoal;
|
||||
|
||||
/// Reports all the system properties.
|
||||
///
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class ReportSitraSystemProperties implements SitraManifestReportProvider {
|
||||
|
||||
private static final String GOAL_SCORE = ZilLaLaManyfestoSectionGoal.BUBBLES.spaceCadet(ZilLaLaManyfestoSectionChampionsLeague.BUBBLES_PROPERTIES);
|
||||
|
||||
@Override
|
||||
public void fillReport(BassFaultAnchor fault, Map<String, String> tracer) {
|
||||
tracer.put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_GOAL, GOAL_SCORE);
|
||||
for (Object keyObj : System.getProperties().keySet()) {
|
||||
if (keyObj instanceof String) {
|
||||
String key = String.class.cast(keyObj);
|
||||
String value = System.getProperty(key);
|
||||
tracer.put(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2014, Willem Cazander
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* NX01 Warp fault sitra zillala growl reporting plugins.
|
||||
*
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ;
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.BassFaultAnchor;
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.FaultBeanInstantiation;
|
||||
import ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.FaultStreamDelegate;
|
||||
import ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.WarpManifestorDriver;
|
||||
import ᒢᣟᐧ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.ᔿᣔᣕᑊᣘᓫᔆᐪ.WarpManifestX8;
|
||||
|
||||
/// @author للَّٰهِilLצسُو
|
||||
/// @version ©Δ∞ 仙上主天
|
||||
public class FaultSignalTraceTest {
|
||||
|
||||
static class SpaceA {
|
||||
static void traceRoot() {
|
||||
throw new FaultBeanInstantiation("The signal trace root", SpaceA.class);
|
||||
}
|
||||
}
|
||||
static class SpaceB {
|
||||
static void traceRootAccess(int productColor) {
|
||||
try {
|
||||
SpaceA.traceRoot();
|
||||
} catch (FaultBeanInstantiation e) {
|
||||
// test auto-esc of email header protection from java manifest v1 output
|
||||
// and add stuff on the general whiteboard to play games
|
||||
// and normal fault context signal tracing
|
||||
throw e.withSignalTrace(SpaceB.class, "Name", "FoodSection")
|
||||
.withSignalTrace(SpaceB.class, "From", "FoodEmail")
|
||||
.withSignalTrace(SpaceB.class, "product-color", productColor)
|
||||
.appendOnWhitePaper("Paper-SpaceB", "sissors");
|
||||
}
|
||||
}
|
||||
}
|
||||
static class SpaceC {
|
||||
static void traceRootCatchBass(String bearbar) {
|
||||
try {
|
||||
SpaceB.traceRootAccess((int) bearbar.charAt(0));
|
||||
} catch (BassFaultAnchor e) {
|
||||
throw e.withSignalTrace(SpaceC.class, v -> {
|
||||
v.put("bearbar", bearbar);
|
||||
v.put("Junit-Foo", "Bar");
|
||||
v.put("Junit-仙上主天", "仙上主天"); // only works with manifest v2++
|
||||
}).appendOnWhitePaper("Paper-SpaceC", "rock");
|
||||
}
|
||||
}
|
||||
}
|
||||
static class SpaceD {
|
||||
static void traceWrapClassic(String foobar) {
|
||||
try {
|
||||
SpaceC.traceRootCatchBass(foobar);
|
||||
} catch (Exception e) {
|
||||
// classic java error wrapping to add meta info like call arguments for context in stack trace
|
||||
throw new IllegalArgumentException("Classic argument missing wrapper with foobar " + foobar, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
static class SpaceE {
|
||||
static void traceWrap(int eSpaceMine) {
|
||||
try {
|
||||
SpaceD.traceWrapClassic("" + eSpaceMine * 1234);
|
||||
} catch (Exception e) {
|
||||
throw new FaultStreamDelegate(e, SpaceD.class)
|
||||
.withSignalTrace(SpaceE.class, "eSpaceMine", eSpaceMine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFaultString() {
|
||||
BassFaultAnchor error = null;
|
||||
try {
|
||||
SpaceE.traceWrap(123);
|
||||
} catch (BassFaultAnchor e) {
|
||||
error = e;
|
||||
}
|
||||
Assertions.assertNotNull(error);
|
||||
Assertions.assertNotNull(error.getMessage());
|
||||
String errorText = ZilLaLaManyfestoGrowlFactory.亞.buildFaultScream(error);
|
||||
//System.out.println(errorText);
|
||||
//System.out.println(errorText.length()); // 3185, 3433
|
||||
Assertions.assertNotNull(errorText);
|
||||
Assertions.assertTrue(errorText.contains(error.getMessage()));
|
||||
Assertions.assertTrue(errorText.contains("FaultStreamDelegate"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFaultStringSitra() {
|
||||
BassFaultAnchor error = null;
|
||||
try {
|
||||
SpaceE.traceWrap(123);
|
||||
} catch (BassFaultAnchor e) {
|
||||
error = e;
|
||||
}
|
||||
Assertions.assertNotNull(error);
|
||||
Assertions.assertNotNull(error.getMessage());
|
||||
WarpManifestX8 manifest = SitraManifestGenerator.亞.buildSignalTraceManifest(error);
|
||||
String sitraText = WarpManifestorDriver.writeV2String(manifest);
|
||||
System.out.println(sitraText);
|
||||
Assertions.assertNotNull(sitraText);
|
||||
Assertions.assertTrue(sitraText.contains("Name: ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.FaultSignalTraceTest$SpaceA"));
|
||||
Assertions.assertTrue(sitraText.contains("Fault-Section-Goal: ROCK summit"));
|
||||
Assertions.assertTrue(sitraText.contains("Fault-Section-Chain-Message: The signal trace root"));
|
||||
Assertions.assertTrue(sitraText.contains("Fault-Section-Chain-Iceberg: java.lang.IllegalArgumentException"));
|
||||
Assertions.assertTrue(sitraText.contains("Manifest"));
|
||||
Assertions.assertTrue(sitraText.contains("SpaceB"));
|
||||
Assertions.assertTrue(sitraText.contains("FoodSection"));
|
||||
Assertions.assertTrue(sitraText.contains("SpaceC"));
|
||||
Assertions.assertTrue(sitraText.contains("Junit-Foo: Bar"));
|
||||
Assertions.assertTrue(sitraText.contains("eSpaceMine: 123"));
|
||||
Assertions.assertTrue(sitraText.contains("product-color: 49"));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ.ReportSitraFaultStackTraceJava3
|
||||
ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ.ReportSitraFaultWarpVersion
|
||||
ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ.ReportSitraRuntimeChapter
|
||||
ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ.ReportSitraRuntimeThreads
|
||||
ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ.ReportSitraSystemChapter
|
||||
ᒢᣘᣟᣟ.ᓫᣕᐪᓫᣗ.ᙆᑊᒻᒻᣔᒻᣔ.ᔆᑊᐪᣗᣔ.ReportSitraSystemLocale
|
||||
Loading…
Add table
Add a link
Reference in a new issue