<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Testing on Dragotins Blog</title>
    <link>https://dragotin.codeberg.page/tags/testing/</link>
    <description>Recent content in Testing on Dragotins Blog</description>
    <image>
      <title>Dragotins Blog</title>
      <url>https://dragotin.codeberg.page/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://dragotin.codeberg.page/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.152.1</generator>
    <language>en</language>
    <copyright>2022-2026 Klaas Freitag - Content is licensed under the Creative Commons Attribution 4.0 International License</copyright>
    <lastBuildDate>Fri, 27 Sep 2013 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://dragotin.codeberg.page/tags/testing/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>DAV Torture</title>
      <link>https://dragotin.codeberg.page/posts/dav-torture/</link>
      <pubDate>Fri, 27 Sep 2013 00:00:00 +0000</pubDate>
      <guid>https://dragotin.codeberg.page/posts/dav-torture/</guid>
      <description>&lt;p&gt;Currently we speak a lot about performance of the ownCloud WebDAV server. Speaking with a computer programmer about performance is like speaking with a doctor about pain. It needs to be qualified, the pain, and also the performance concerns.&lt;/p&gt;
&lt;p&gt;To do a step into that direction, here is a little script collection for you to play with if you like: the DAV torture collection. We started it quite some time ago but never really introduced it. It is still very rough.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Currently we speak a lot about performance of the ownCloud WebDAV server. Speaking with a computer programmer about performance is like speaking with a doctor about pain. It needs to be qualified, the pain, and also the performance concerns.</p>
<p>To do a step into that direction, here is a little script collection for you to play with if you like: the DAV torture collection. We started it quite some time ago but never really introduced it. It is still very rough.</p>
<h2 id="what-it-does">What it does</h2>
<p>The first idea is that we need a reproducable set of files to test the server with. We don&rsquo;t want to send around huge tarballs with files, so Danimo invented two perl scripts called <code>torture_gen_layout.pl</code> and <code>torture_create_files.pl</code>. With <code>torture_gen_layout.pl</code> one can create a file that contains the layout of the test file tree, a so called layout( or .lay)-file. The .lay-file describes the test file tree completely, with names, structure and size.</p>
<p><code>torture_gen_layout.pl</code> takes the .lay-file and really creates the file tree on a machine. The cool thing about is that we can commit on a .lay-file as our standard test tree and just pass a file around with a couple of kbytes size that describes the tree.</p>
<p>Now that there is a standard file tree to test with, I wrote a little script called <code>dav_torture.pl</code>. It copies the whole tree described by a .lay file and created on the local file system to an ownCloud WebDAV server using PUT requests. Along with that, it produces performance relevant output.</p>
<h2 id="try-it">Try it</h2>
<p>Download the <a href="http://download.owncloud.org/download/testing/davtorture.tgz">tarball</a> and unpack it, or clone it from <a href="https://github.com/owncloud/administration">github</a>.</p>
<p>After having installed a couple of perl deps (probably only modules Data::Random::WordList, HTTP::DAV, HTTP::Request::Common are not in perl&rsquo;s core) you should be able to run the scripts from within the directory.</p>
<p>First, you need to create a config file. For that, copy t1.cfg.in to t1.cfg (don&rsquo;t ask about the name) and edit it. For this example, we only need user, passwd and url to access ownCloud. Be careful with the syntax, it gets sourced into a perl script.</p>
<p>Now, create the local reference tree with a .lay-file which I put into the tarball: <code>./torture_create_files.pl small.lay tree</code> This command will build the file tree described by small.lay into the directory called <em>tree</em>.</p>
<p>Now, you can already treat your server: Call <code>./dav_torture.pl small.lay tree</code> This will perform PUT commands to the WebDAV server and output some useful information. It also appends to two files <em>results.dat</em> and <em>puts.tsv</em>. results.dat just logs the results of subseqent call. The tsv file is the data file for the html file <code>index.html</code> in the same directory. That opened in a browser gives a curve over the average transmission rate of all subsequent runs of <code>dav_torture.pl</code> (You have run <code>dav_torture.pl</code> a couple of times to make that visible). The <code>dav_torture.pl</code> script can now be hooked into our Jenkins CI and performed after every server checkin. The resulting curve must never raise :-)</p>
<p>To create your own .lay-file, open <code>torture_gen_layout.pl</code> and play with the variables on top of the script. Simply call the script and redirect into a file to create a .lay-file.</p>
<p>All this is pretty experimental, but I thought it will help us to get to a more objective discussion about performance. I wanted to open this up in a pretty early stage because I am hoping that this might be interesting for somebody of you: Treat your own server, create interesting .lay files or improve the script set (testing plain PUTs is rather boring) or the result html presentation.</p>
<p>What do you think?</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
