Is there a setting in jmeter to display all values in seconds instead of milliseconds.
I usually use excel to do the conversion manually, but was hoping there was some way of doing this automatically.
Thanks!
I was able to find a temporary solution. Iused the bundled xsl file in the extra directory and edited the display-time section to this
<xsl:template name="display-time">
<xsl:param name="value" />
<xsl:value-of select="format-number(($value div 1000),'0 s')" />
</xsl:template>
and then ran the following command
xsltproc jmeter-results-detail.xsl results.jtl > results.html
The resulting file displays the response times in seconds.
Related
I'm having next structure of TG in Jmeter:
So I have variable LB_LEVEL and 100 threads. It's value for every user may be different (from 1lv to 23lv e.g.)
I try to find a way to make some visual report with this variable, simply I have to show how users were casted to different levels.
It may be csv, or smh. Ideal table of my dream looks like this:
Googling still brings me some foam, so I need a small idea or kick to correct direction.
Thank you!
Add the next lines to user.properties file:
sample_variables=LB_LEVEL
jmeter.reportgenerator.graph.custom_testGraph.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer
jmeter.reportgenerator.graph.custom_testGraph.title=LB LEVEL
jmeter.reportgenerator.graph.custom_testGraph.property.set_Y_Axis=LB LEVEL
jmeter.reportgenerator.graph.custom_testGraph.set_X_Axis=Over Time
jmeter.reportgenerator.graph.custom_testGraph.property.set_granularity=60000
jmeter.reportgenerator.graph.custom_testGraph.property.set_Sample_Variable_Name=LB_LEVEL
jmeter.reportgenerator.graph.custom_testGraph.property.set_Content_Message=LB_LEVEL:
sample_variables is a special property which saves custom variable(s) into .jtl results file
Restart JMeter to pick the properties up
Run your JMeter test in command-line non-GUI mode and generate the HTML Reporting Dash board as:
jmeter -n -t <test JMX file> -l <test log file> -e -o <Path to output folder>
Open <Path to output folder>/index.html file with your favourite browser - you will see plotted LB_LEVEL values along with other tables and charts.
If for some reason it doesn't fit your needs you can consider using Flexible File Writer to store the metrics of your choice into a file, in your case they would be grpThreads and variable#0
Hi I have small doubt in klish xml file. I implemented a small xml file for klish
<COMMAND name="show core"
help="It will show core status"
<ACTION> echo "core status" </ACTION>
</COMMAND>
I thought that by using command "show core" on klish command line it will print the core status as output but I am not able to print core status on command line of klish
How to solve ?
We can not use space in the < COMMAND > tag like in my case I used.
<COMMAND name="show core">
This is not the proper way to use space in the < COMMAND > tag
But if you want that your command should be like this only i.e. show core then there are two ways to achieve it.
First way:-
<COMMAND name="show"
help="Put what help you want to give"/>
<COMMAND name="show core"
help="Put what help you want to give">
<DETAIL>
</DETAIL>
<ACTION>echo "core status"</ACTION>
</COMMAND>
Second way:- Use VAR tag and completion attribute in PARAM tag
<COMMAND name="show"
help="Put what help you want to give">
<PARAM name="pname"
help="Put what help you want to give"
ptype="STRING"
completion="${vartagvariable}"/>
<DETAIL>
</DETAIL>
<ACTION>echo "core status"</ACTION>
<VAR name="vartagvariable" help="Something...." value="core" />
</COMMAND>
I need to analyses a file and change some fields.
Example:
<taskdef uri="xxxxxx" resource="/mnt/data/yyy.xml">
<classpath path="/mnt/data/test.jar"/>
</taskdef>
<target name="test"
description="this is a xml file">
<fileset dir="/tmp/data/output/test_1/" includes=all/>
In my case I need to find this part:
<fileset dir="/tmp/data/output/test_1/" includes=all/>
and change just the name (for example) test_1
At the end, save the file
In your comment you say you "cannot use libraries like Nogokiri to parse the file". So I can only guess you're not doing full XML parsing.
Assuming you do not have to parse XML you could just use Ruby's String.replace method on the line in question. Just iterate over the lines in the file until you get to the one in quesion and call replace. Here's some pseudocode.
open file
for each line
is this what I want to change
change line
save (new) file
I need to output some hex-data with some bytes highlighted with colored background. Bytes in the data that represent red color values should have red background. That's why I chose
<emphasis role="red"></emphasis>
to be the tag of choice.
HTML output
For HTML output I use
<xsl:param name="emphasis.propagates.style" select="1"/>
in the xsl file and
.red {
background-color: red;
}
in the stylesheet.
This works flawlessly.
PDF output
For PDF output I use dblatex and tried (file fo.xsl)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:d="http://docbook.org/ns/docbook"
xmlns="http://www.w3.org/TR/xhtml1/transitional"
version="1.0">
<xsl:param name="draft.mode">no</xsl:param>
<xsl:param name="imagedata.default.scale">maxwidth=12cm</xsl:param>
<xsl:template match="emphasis[#role='red']">
<xsl:param name="content">
<xsl:apply-templates/>
</xsl:param>
<xsl:text>{\color{red}</xsl:text>
<xsl:copy-of select="$content"/>
<xsl:text>}</xsl:text>
</xsl:template>
</xsl:stylesheet>
And (file test.xml)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<article lang="en">
<title>Test</title>
<para>
<screen>0240h: 00 20 <emphasis role="red">00</emphasis> 21</screen>
</para>
</article>
With the following command to build latex source for checking:
dblatex --backend=pdftex --xslt=xsltproc \
--input-format=xml --type=tex \
--xsl-user=fo.xsl --verbose --output=test.tex test.xml
This does not work. Emphasised text is still italic, as shown in an excerpt from the resulting test.tex:
\begin{lstlisting}[firstnumber=1,escapeinside={<t>}{</t>},moredelim={**[is][\bfseries]{<b>}{</b>}},moredelim={**[is][\itshape]{<i>}{</i>}},]
0240h: 00 20 <i>00</i> 21\end{lstlisting}
What am I doing wrong?
As mzjn stated, the screen tag was a problem. After reading the linked resource, the final template that works for me in this case, and produces output similar to the html look, is this:
<xsl:template match="emphasis[#role='red']" mode="latex.programlisting">
<xsl:param name="co-tagin" select="'<:'"/>
<xsl:param name="rnode" select="/"/>
<xsl:param name="probe" select="0"/>
<xsl:param name="content">
<xsl:apply-templates/>
</xsl:param>
<xsl:text><t>\colorbox{red}{</xsl:text>
<xsl:copy-of select="$content"/>
<xsl:text>}</t></xsl:text>
</xsl:template>
which leads to the following latex output:
\begin{lstlisting}[firstnumber=1,escapeinside={<t>}{</t>},moredelim={**[is][\bfseries]{<b>}{</b>}},moredelim={**[is][\itshape]{<i>}{</i>}},]
0240h: 00 20 <t>\colorbox{red}{00}</t> 21\end{lstlisting}
Maybe it would be better to add another moredelim to lstlisting than using the escapeinside, but with this solution, this question is answered for me.
You are using dblatex, which is a tool (a set of XSLT stylesheet modules) that produces PDF output from DocBook where the intermediate format is LaTeX rather than XSL-FO. So in order to customize the look and feel of inline text (such as emphasis), you have to use LaTeX. The following template should work for you:
<xsl:template match="emphasis[#role='red']">
<xsl:param name="content">
<xsl:apply-templates/>
</xsl:param>
<xsl:text>{\color{red}</xsl:text>
<xsl:copy-of select="$content"/>
<xsl:text>}</xsl:text>
</xsl:template>
Note that it says emphasis (without a d: prefix). dblatex strips out the namespace from DocBook 5 source documents at the start of the transformation, so there should be no namespaces in customizations either.
The fact that the emphasis occurs within screen (which is a "verbatim" element; see http://dblatex.sourceforge.net/doc/manual/sec-verbatim.html) makes things more complicated. My customization suggestion does work if the screen start and end tags are removed from your sample para.
If bold text instead of red-coloured is an acceptable compromise, you can use the following in your XML document:
<screen>0240h: 00 20 <emphasis role="bold">00</emphasis> 21</screen>
No customization is needed for this to work. role="bold" is handled by the default dblatex stylesheets.
I've just begun using Chirpy, and it's frigging amazing. One problem I'm having is that I'm unable to get it to update the mashed file(s) when an edit is made in one of the "sub" files.
IE: If I have a mashed file called "site.css" (via my js.chirp.config file) which contains "elements.css", "master.css", "misc.css" etc. And I make an edit to one of them (say, master.css), I want chirpy to kick in and redo the site.css with the new edits.
Is this at all possible?
Chirpy does this - just make sure your paths use backslashes rather than forward slashes.
<root>
<FileGroup Name="site.css">
<File Path="css\elements.css" />
<File Path="css\master.css" />
<File Path="css\misc.css" />
</FileGroup>
</root>
Chirpity chirp chirp chirp.
I have
<Folder Pattern="*.min.css" Minify="false" />
And with that wildcard in there, it doesnt run when min.css files are updated. I have to update the config and save for the mash to occur