++
отслеживание нанов в тестах
This commit is contained in:
21
src/_VisualDVM/Passes/All/DeleteRemoteWorkspace.java
Normal file
21
src/_VisualDVM/Passes/All/DeleteRemoteWorkspace.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import _VisualDVM.ComponentsServer.SubscriberWorkspace.SubscriberWorkspace;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.Server.ComponentsServerPass;
|
||||
import _VisualDVM.Repository.Server.ServerCode;
|
||||
import javafx.util.Pair;
|
||||
public class DeleteRemoteWorkspace extends ComponentsServerPass<SubscriberWorkspace> {
|
||||
@Override
|
||||
public String getIconPath() {
|
||||
return "/Common/icons/Delete.png";
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (Global.componentsServer.credentials_db.workspaces.getUI().CheckCurrent(Log)) {
|
||||
target = Global.componentsServer.credentials_db.workspaces.getUI().getCurrent();
|
||||
return SendRequest(ServerCode.DeleteSubscriberWorkspace, "",
|
||||
new Pair<>(target.getClass(), target.getPK()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.Pass;
|
||||
import _VisualDVM.Utils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -38,46 +39,5 @@ public class TestPass extends Pass {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
int a = 1 / 0;
|
||||
// System.out.println(Global.componentsServer.credentials_db.userAccounts.getPackedActiveRecipients());
|
||||
// String cpuId = getMotherboardSN();
|
||||
// UI.Info(cpuId);
|
||||
/*
|
||||
SystemInfo systemInfo = new SystemInfo();
|
||||
HardwareAbstractionLayer hardware = systemInfo.getHardware();
|
||||
CentralProcessor processor = hardware.getProcessor();
|
||||
CentralProcessor.ProcessorIdentifier processorIdentifier = processor.getProcessorIdentifier();
|
||||
System.out.println("Processor Vendor: " + processorIdentifier.getVendor());
|
||||
System.out.println("Processor Name: " + processorIdentifier.getName());
|
||||
System.out.println("Processor ID: " + processorIdentifier.getProcessorID());
|
||||
System.out.println("Identifier: " + processorIdentifier.getIdentifier());
|
||||
System.out.println("Microarchitecture: " + processorIdentifier.getMicroarchitecture());
|
||||
System.out.println("Frequency (Hz): " + processorIdentifier.getVendorFreq());
|
||||
System.out.println("Frequency (GHz): " + processorIdentifier.getVendorFreq() / 1000000000.0);
|
||||
*/
|
||||
/*
|
||||
String serial = "";
|
||||
Scanner sc = null;
|
||||
Process process = null;
|
||||
try {
|
||||
process = Runtime.getRuntime().exec(new String[] { "wmic", "cpu", "get", "ProcessorId" });
|
||||
process.getOutputStream().close();
|
||||
sc = new Scanner(process.getInputStream());
|
||||
sc.next();
|
||||
serial = sc.next();
|
||||
} catch (IOException e) {
|
||||
} dummy
|
||||
UI.Info(Utils_.Brackets(serial));
|
||||
*/
|
||||
/*
|
||||
KeyGenerator keyGenerator = KeyGenerator.getInstance("AES");
|
||||
SecureRandom secureRandom = new SecureRandom();
|
||||
int keyBitSize = 256;
|
||||
keyGenerator.init(keyBitSize, secureRandom);
|
||||
SecretKey secretKey = keyGenerator.generateKey();
|
||||
System.out.println("====");
|
||||
System.out.println(secretKey.getEncoded());
|
||||
System.out.println("====");
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user