At JPL, we use model transformation techniques for our systems engineering work.We use the Eclipse QVTO implementation of OMG's QVT specification.
Construction and destruction. Archive: JProfiler 11.0. You may install a new version of JProfiler on top of an older version.
However, the Eclipse QVTO compiler is frustratingly slow. With judicious application of Guava's cache, I've managed to make significantperformance improvements to the Eclispe QVTO compiler. More could be donebut with what I have, I would like to get a view of the effectivenessof the caching optimizations in place by monitoring the cache statistics at runtime;i.e, com.google.common.cache.CacheStats
Has anyone suggestions w.r.t. how to define a JProfiler custom telemetry probeto do this?
- Nicolas.
1 answer
- answered 2011-10-24 08:34For a single cache that you can access with a static method, it's fairly easy. In the custom probe wizard, set the meta-data script toand the telemetry script towhere
CacheTest.getSingleCache()
is the hook to get at your cache.This will get you telemetry for all cache statistics measurements, like shown in the screen shot below:
![Jprofiler Jprofiler](https://www.ej-technologies.com/assets/products/jprofiler/whatsnew/jfr_thread_history-b5aa91b788bb46577bafb5767af63f13.png)
![Jprofiler Jprofiler](https://www.ej-technologies.com/assets/products/jprofiler/top10/probes_fsa-3e9a30c402ac6f81612e2e291f0927f3.png)
Jprofiler 11 0 3 0
Test your English vocabulary size, and measure
how many words do you know
how many words do you know
See also questions close to this topic
Jprofiler 11 0 3 Download
- Mockito Argument Captors and Reference VariableI have the following bit of code that some long-departed developer wrote:This bit of code is very close to untestable, as I don't know how to mock out the result.Is it possible to use an ArgumentCaptor to mock the result of the dao to provide a given value for the
doc
value for a givendocumentId
? I'd prefer NOT to change the dao call at this time (if possible).Edit: I was requested to flesh out the above example. This is a simplified version of it:I understand it would make MUCH more sense to return the Document from theload()
method, unfortunately the original developer was trying to do two things at once.I'm trying to NOT introduce new methods if possible. I just need to know if I'm using Mockito to mock aDocumentDAO
instance, can I adjust an input in the manner the above method does. - Java crypto Signature . Can't understand some parametersi am trying to verify signature which is signed base45 encrypted JSON passport data.Main goal - verify data which i retrive from server.I found some code and can't understand some paramaters (maybe i wrong in all)So here as we see :PublicKey i can retrive from server. It's like base64String. Code below i used to transform it to PublicKeyBut how about other two parameters :signature and signedData .I can retrive data which is signed as base45 encrypted JSON but can't understand what is thatsignature or signedData. If it is, for example, signature - than what is signedData ?I'm not familar with this part of code and realy don't understand. Maybe someone can help me ?
- Scan texts for keyword list, tolerate spelling mistakes, determine a matching score for textsI have a problem which I cannot solve on my own now.My task is as following:I have various texts and an array of strings.The string array could contain single words or combination of words like this:
['apple', 'orange fruit', 'strawberry field', 'ananas', 'tomato plant']
.Now I need to scan my texts for the elements in the array and determine a score.If a text contains many of the strings (or a combination of it) it should result in a bigger score than other texts.The result should also tolerate spelling mistakes if possible.Can someone give me a hint what would be the best way to solve this issue?Are there any libraries which could help solving this problem?The language I am coding in is Java.Thank you in advance guys. - Maven error: package com.google.common.collect does not existIn my pom.xml file, I have addedand I have downloaded the jar file from https://github.com/google/guava/releases/tag/v31.0.1 and added it to my build path.Eclipse recognizes the import, as it does not give an error on the import line which is
import com.google.common.collect.Lists;
.However, when I runmvn package
, I getpackage com.google.common.collect does not exist
even after cleaning the project.Is there something else I am missing? - How to thread-safe update loadingcache value guava mapFor the test, in the addCache method, I created and added a map. The card has a key 'a' and a value '1111'. And key 'b' for LoadingCache.Next, I want to update the value '1111' to the value '2222'. To do this, I pass all the necessary parameters from the main method to find the value '1111'.How can I update '1111' to '2222' in a thread-safe way?
- com/google/common/cache/RemovalCause java.lang.NoClassDefFoundErrorI'm using google guava for caching, the runtime is able to find all the classes in the jar except the RemovalCause, i have checked that the class exists in the jar using jar -tf, even redeployed to avoid jar corruption scenario. But still not able to figure what's wrong in this?
- JProfiler remote process list empty after selecting containerI'm using JProfiler 12 and trying to attach via SSH to a remote JVM process in a Docker container. I've followed the instructions here: https://www.ej-technologies.com/products/jprofiler/whatsnew12.html#:~:text=Attaching%20to%20JVMs%20runningEverything is working well until I have to choose the process. The list is empty. There's no error message.I can't find any such issue anywhere. I found someone else who had folder permission problems but that cannot be my issue since I'm connecting as root. Even when I chmod folder permissions to 777, it still does nothing.This is what I get:This is what I should get:[UPDATE 1 Oct 2021]One problem is I was using a Kubernetes pod securityContext with readOnlyRootFilesystem, allowPrivilegeEscalation, and dropping some capabilities. When I remove those, I can see the process. But then when I click Open, it fails with this error:Which seems to indicate that I was using the wrong user (root). But when I switch to that user, I get this error before I can even choose the container:So now I'm stuck one step earlier.
- Analysis of CPU Load with JProfilerI would like to evaluate my CPU usage of my Java web application with the JProfiler in 'sampling' mode.The application is based on the Spring boot framework.However, JProfiler always shows a CPU usage of 9%-11%. However, there is practically nothing going on on the server. There are no requests to the application and the CPU usage never approaches 0%, but remains at 9%-11%. I would have expected the CPU usage to drop below 9% as well.In the 'Thread History' overview, all threads are in the 'Waiting' or 'Net I/O' status.Could it be that this usage is the overhead created by the JProfiler?Many thanks in advance.
- JProfiler is able to find JVM process for one user but can find it for another user on the same machineI have an ec2-instance with two different users, ec2-user and other-user and I have some jvm processes running on each. I am trying to remote connect via JProfiler but I cannot seem to be able to find the JVM processes in JProfiler (version 12.0.3 Build 12084)So I started digging into the box to check whats happening, here is what i found9014 here is the pid of the java process and the file contains some binary data. However there is another java process run as ec2-user, but that is not showing up in /tmp/hsperfdata_ec2-user.The two JVMs only differ in the version they are started withThe one that is for the java process run as ec2-userThe other one for the other-userI ran ps aux |grep java and found both pids functioning.I tried to delete the directory, restart the jvm process for ec2-user and then try to attach it again but that did not work.I also tried to use a different version of JProfiler locally like this on the ec2-instanceI am at a loss at how to progress. I was scrounging around for logs for JProfiler remote agent but so far have not found anything. I thought it was a permissions issue on the directories but they seem to be fine. I was checking the release logs but nothing stood out.Can someone please help me with this?
- Model transformation to platform specific (NC) codeTools experience wear during usage. Machines using these tools need to have their NC (i.e. numerical control) programs corrected, after the wear is measured.I've already created a XSD model and generated JAXB classes that manage these measures, now I want to automatically generate NC code that sets the measured differences on the machines.The code to be generated basically has this format (plus possibly some static prefixing/suffixing code):with
t
being the ID of the tool,D
being a cutting edge on this tool, andx
being a parameter related to the cutting edge.For different toolst
,x
andD
have different meaning, e.g.$TC_DP1[10, 2]
is length of edge 2 on tool 10.$TC_DP1[5, 2]
could be width of edge 2 on tool 5.I'm looking for a way to declaratively define the mapping between the$TC_DP<x>[<t>, <D>]
format and the model I've created, in order to have the NC code generated for me. - How to get an OrderedSet of OccurrenceSpecifications from a Lifeline in QVTo?From the diagram on page 570 of the UML spec I concluded that a
Lifeline
should have theevents
property, holding anOrderedSet(OcurrenceSpecification)
. Unfortunately it is not there, at least in the QVTo implementation that I use.All I have is thecoveredBy
property, serving me with an (unordered)Set(InteractionFragment)
. Since my transformation relies on the correct order ofMessageOcurrenceSpecification
I somehow need to implement myself what I expected to be implemented by the missingevents
property.This is what I have so far:ObviouslysortedBy(true)
does not get me far, but I don't know any further. Who can help?All I could find so far were other people struggling with the same issue years ago, but no solution: - How to apply a stereotype from UML Standard Profile inside QVTo transformation?Inside a QVTo transformation I want to apply the
<<Create>>
stereotype from the UML Standard Profile to a newly created Operation. On page 678 of the UML spec it says, that it is applicable to BehavioralFeatures and consequently to Operations. I tried the following inside a helper, but to no avail:The transformation works on aninout sourceModel : UML
and I checked that the profile is applied to thesourceModel
in advance:What am I doing wrong and how is this done correctly? - Scrape App metrics using Prometheus with Envoy side car proxyI am using GKE for my workloads. I have installed Istio 1.11.0 on my cluster. I have also have installed Prometheus in
istio-system
namespace using this link.I have a Python application deployed in theprom-test
namespace, which is collecting metrics at port 8080 as below.I have used the below annotation in the deployment file to have the metrics scrapped by PrometheusThere are 2 containers running in the 1) the application container and 2) the envoy proxy containerWhen I bring up the Prometheus dashboard, I see all Targets are up and for my app its being scrapped atBut I could see any application related metrics?It would be really helpful, if veterans here can advise on the same - Group by key value pair of metadata in the insight query for QnAMaker logsI've assigned each questions in the knowledge base a metadata of category and it's value as a key:value pair. Is there a way to write a query in such a way that returns logs of questions asked grouped by category? i.e a kind of an indicator on questions from which category are asked the most?
- How to inject track telemetry to a video as per camm-specI created a video using images and want to inject telemetry track data into it and as per https://developers.google.com/streetview/publish/camm-specCan anyone tell me, how is it possible?