From 352007652b62587a2f2cc626516768765422cb50 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 30 Mar 2020 15:22:11 +0100 Subject: [PATCH] JAL-3210 debug logging commented out --- src/jalview/ext/ensembl/EnsemblRestClient.java | 12 ++--- src/jalview/ext/ensembl/EnsemblSeqProxy.java | 50 +++++++++------------ src/jalview/fts/service/pdb/PDBFTSRestClient.java | 24 +++++----- src/jalview/gui/Desktop.java | 2 +- 4 files changed, 41 insertions(+), 47 deletions(-) diff --git a/src/jalview/ext/ensembl/EnsemblRestClient.java b/src/jalview/ext/ensembl/EnsemblRestClient.java index bf151bf..771980c 100644 --- a/src/jalview/ext/ensembl/EnsemblRestClient.java +++ b/src/jalview/ext/ensembl/EnsemblRestClient.java @@ -20,9 +20,6 @@ */ package jalview.ext.ensembl; -import jalview.util.Platform; -import jalview.util.StringUtils; - import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; @@ -39,6 +36,9 @@ import javax.ws.rs.HttpMethod; import org.json.simple.parser.ParseException; +import jalview.util.Platform; +import jalview.util.StringUtils; + /** * Base class for Ensembl REST service clients * @@ -319,10 +319,10 @@ abstract class EnsemblRestClient extends EnsemblSequenceFetcher InputStream response = connection.getInputStream(); - Platform.timeCheck(null, Platform.TIME_MARK); + // Platform.timeCheck(null, Platform.TIME_MARK); Object ret = Platform.parseJSON(response); - Platform.timeCheck("EnsemblRestClient.getJSON " + url, - Platform.TIME_MARK); + // Platform.timeCheck("EnsemblRestClient.getJSON " + url, + // Platform.TIME_MARK); return ret; } diff --git a/src/jalview/ext/ensembl/EnsemblSeqProxy.java b/src/jalview/ext/ensembl/EnsemblSeqProxy.java index d483c3b..fd8800f 100644 --- a/src/jalview/ext/ensembl/EnsemblSeqProxy.java +++ b/src/jalview/ext/ensembl/EnsemblSeqProxy.java @@ -20,6 +20,17 @@ */ package jalview.ext.ensembl; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.json.simple.parser.ParseException; + import jalview.analysis.AlignmentUtils; import jalview.analysis.Dna; import jalview.bin.Cache; @@ -40,18 +51,6 @@ import jalview.util.Comparison; import jalview.util.DBRefUtils; import jalview.util.IntRangeComparator; import jalview.util.MapList; -import jalview.util.Platform; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import org.json.simple.parser.ParseException; /** * Base class for Ensembl sequence fetchers @@ -211,8 +210,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient EnsemblFeatures gffFetcher = new EnsemblFeatures(getDomain()); EnsemblFeatureType[] features = getFeaturesToFetch(); - Platform.timeCheck("ESP.getsequencerec1", Platform.TIME_MARK); - + // Platform.timeCheck("ESP.getsequencerec1", Platform.TIME_MARK); AlignmentI geneFeatures = gffFetcher.getSequenceRecords(accId, features); @@ -221,7 +219,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient genomicSequence = geneFeatures.getSequenceAt(0); } - Platform.timeCheck("ESP.getsequencerec2", Platform.TIME_MARK); + // Platform.timeCheck("ESP.getsequencerec2", Platform.TIME_MARK); if (genomicSequence != null) { @@ -236,7 +234,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient * fetch and map protein product, and add it as a cross-reference * of the retrieved sequence */ - Platform.timeCheck("ESP.transferFeatures", Platform.TIME_MARK); + // Platform.timeCheck("ESP.transferFeatures", Platform.TIME_MARK); addProteinProduct(querySeq); } } @@ -245,7 +243,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient System.err.println( "Error transferring Ensembl features: " + e.getMessage()); } - Platform.timeCheck("ESP.addfeat done", Platform.TIME_MARK); + // Platform.timeCheck("ESP.addfeat done", Platform.TIME_MARK); } /** @@ -359,7 +357,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient protected void getCrossReferences(SequenceI seq) { - Platform.timeCheck("ESP. getdataseq ", Platform.TIME_MARK); + // Platform.timeCheck("ESP. getdataseq ", Platform.TIME_MARK); while (seq.getDatasetSequence() != null) @@ -367,7 +365,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient seq = seq.getDatasetSequence(); } - Platform.timeCheck("ESP. getxref ", Platform.TIME_MARK); + // Platform.timeCheck("ESP. getxref ", Platform.TIME_MARK); EnsemblXref xrefFetcher = new EnsemblXref(getDomain(), getDbSource(), getEnsemblDataVersion()); @@ -397,8 +395,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient seq.addDBRef(self); - Platform.timeCheck("ESP. seqprox done ", Platform.TIME_MARK); - + // Platform.timeCheck("ESP. seqprox done ", Platform.TIME_MARK); } /** @@ -419,7 +416,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient inProgress = false; throw new JalviewException("ENSEMBL Rest API not available."); } - Platform.timeCheck("EnsemblSeqProx.fetchSeq ", Platform.TIME_MARK); + // Platform.timeCheck("EnsemblSeqProx.fetchSeq ", Platform.TIME_MARK); List seqs = parseSequenceJson(ids); if (seqs == null) @@ -486,8 +483,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient * for now, assumes only one sequence returned; refactor if needed * in future to handle a JSONArray with more than one */ - - Platform.timeCheck("ENS seqproxy", Platform.TIME_MARK); + // Platform.timeCheck("ENS seqproxy", Platform.TIME_MARK); Map val = (Map) getJSON(null, ids, -1, MODE_MAP, null); if (val == null) return null; @@ -513,7 +509,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient System.err.println("Error processing JSON response: " + e.toString()); // ignore } - Platform.timeCheck("ENS seqproxy2", Platform.TIME_MARK); + // Platform.timeCheck("ENS seqproxy2", Platform.TIME_MARK); return result; } @@ -826,9 +822,7 @@ public abstract class EnsemblSeqProxy extends EnsemblRestClient return false; } - - Platform.timeCheck("ESP. xfer " + sfs.size(), Platform.TIME_MARK); - + // Platform.timeCheck("ESP. xfer " + sfs.size(), Platform.TIME_MARK); boolean result = transferFeatures(sfs, targetSequence, mapping, accessionId); diff --git a/src/jalview/fts/service/pdb/PDBFTSRestClient.java b/src/jalview/fts/service/pdb/PDBFTSRestClient.java index c52da40..22ed591 100644 --- a/src/jalview/fts/service/pdb/PDBFTSRestClient.java +++ b/src/jalview/fts/service/pdb/PDBFTSRestClient.java @@ -20,17 +20,6 @@ */ package jalview.fts.service.pdb; -import jalview.datamodel.SequenceI; -import jalview.fts.api.FTSData; -import jalview.fts.api.FTSDataColumnI; -import jalview.fts.api.FTSRestClientI; -import jalview.fts.core.FTSRestClient; -import jalview.fts.core.FTSRestRequest; -import jalview.fts.core.FTSRestResponse; -import jalview.util.JSONUtils; -import jalview.util.MessageManager; -import jalview.util.Platform; - import java.net.URI; import java.util.ArrayList; import java.util.Collection; @@ -48,6 +37,17 @@ import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.WebResource; import com.sun.jersey.api.client.config.DefaultClientConfig; +import jalview.datamodel.SequenceI; +import jalview.fts.api.FTSData; +import jalview.fts.api.FTSDataColumnI; +import jalview.fts.api.FTSRestClientI; +import jalview.fts.core.FTSRestClient; +import jalview.fts.core.FTSRestRequest; +import jalview.fts.core.FTSRestResponse; +import jalview.util.JSONUtils; +import jalview.util.MessageManager; +import jalview.util.Platform; + /** * A rest client for querying the Search endpoint of the PDB API * @@ -165,7 +165,7 @@ public class PDBFTSRestClient extends FTSRestClient URI uri = webResource.getURI(); - System.out.println(uri); + // System.out.println(uri); // Execute the REST request ClientResponse clientResponse = webResource diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 82d38e3..326a378 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -2489,7 +2489,7 @@ public class Desktop extends jalview.jbgui.GDesktop @Override public void setProgressBar(String message, long id) { - Platform.timeCheck("Desktop " + message, Platform.TIME_MARK); + // Platform.timeCheck("Desktop " + message, Platform.TIME_MARK); if (progressBars == null) { -- 1.7.10.2