Re: Realistic content simulation

unjc email <[email protected]> Thu, 8 Aug 2013 17:43:57 -0400
Newsgroups gmane.comp.web.web-polygraph.user
Message-ID <CAG8sZZAc6h308pH0CX9q-czaYZ6Aa98wJM2LgcwGN+PMJyQmGQ@mail.gmail.com>
--===============1511018080==
Content-Type: multipart/alternative; boundary=047d7bb03ff82b528b04e3768e94

--047d7bb03ff82b528b04e3768e94
Content-Type: text/plain; charset=ISO-8859-1

I want to know if the content size (i.e. exp(11KB) in the example below) is
also effective in CSM.  What if I have a cdb of jpg images, does
webpolygraph server trim and extend the image files being served in order
to achieve the size as specified?   If so, will the serving contents still
be authentic (image/zip/flash...) files?

http://www.web-polygraph.org/docs/userman/csm/

*Content SimpleContent = {
    mime = { type = "text/html"; extensions = [ ".html" ]; };
    size = exp(11KB);
    cachable = 80%;

    content_db  = "pages.cdb"; // import content templates
    ...
};*



Thanks,
Jacky


On Thu, Apr 12, 2012 at 2:08 PM, Dmitry Kurochkin <
dmitry.kurochkin-LbpN3Auhdh+Rtz+nHKFJDvXmoG9oyoYx@public.gmane.org> wrote:

> Hi Jacky.
>
> unjc email <[email protected]> writes:
>
> > Hi there,
> >
> > I have followed the Realistic content simulation manual to try to
> > create realistic image contents.  Here are what I have done:
> >
> > 1.  Created cdb file
> > I have created cdb file that contains jpg image files only.
> >> polygraph-4.3.1/src/csm/cdb --add wp.cdb media/*.jpg
> >
> > Question: Can I add different file types (.jpg, .gif, .png) and kinds
> > (.flv, .html, .swf) into the cdb file?
> >
>
> PGL ContentType uses all objects in the given cdb database.  You can add
> any files to a single cdb database but PGL ContentType would not
> distinguish between them which is probably not what you want.
>
> >
> > 2.  add a PGL ContentType for images from that database
> >
> > Content ImageContent = {
> >     kind = "image";
> >     mime = { type = "image/jpeg"; extensions = [ ".jpg" ]; };
> >     //obj_life_cycle = olcImage;
> >     //size = const(13KB);
> >     cachable = 0%;
> >     checksum = 1%;
> >     content_db  = "workloads/wp.cdb"; // import content templateS
> > };
> >
> > Server S = {
> >     kind = "S101";
> >     contents = [ ImageContent ];
> >     direct_access = contents;
> >     ...
> >
> >
> > I download an image from one of the URLs and try to view it on a
> > browser; but the image is shown broken.
> > http://hostname:9090/w1925a4f2.210b3b17:00000008/t03/_00000003.jpg
> >
>
> You should use "--format verbatim" option when adding images to cdb
> database.  This would
>
> Regards,
>   Dmitry
>
> >
> > Please advise if I have missed any step in creating the realistic
> > image contents.
> >
> >
> >
> >
> > Thanks,
> > Jacky
> > _______________________________________________
> > Users mailing list
> > Users-mN9fGWdlm5pku/f+YMZH/di2O/[email protected]
> > http://www.web-polygraph.org/mailman/listinfo/users
>

--047d7bb03ff82b528b04e3768e94
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I want to know if the content size (i.e. exp(11KB) in=
 the example below) is also effective in CSM. =A0What if I have a cdb of jp=
g images, does webpolygraph server trim and extend the image files being se=
rved in order to achieve the size as specified? =A0 If so, will the serving=
 contents still be authentic (image/zip/flash...) files? =A0</div>
<div><br></div><a href=3D"http://www.web-polygraph.org/docs/userman/csm/">h=
ttp://www.web-polygraph.org/docs/userman/csm/</a><br><div><div><pre style=
=3D"color:rgb(0,0,0)"><em><small>Content SimpleContent =3D {
    mime =3D { type =3D &quot;text/html&quot;; extensions =3D [ &quot;.html=
&quot; ]; };
    size =3D exp(11KB);
    cachable =3D 80%;

    content_db  =3D &quot;pages.cdb&quot;; // import content templates
    ...
};</small></em></pre></div><div><br></div><div><br></div></div><div>Thanks,=
=A0</div><div>Jacky</div></div><div class=3D"gmail_extra"><br><br><div clas=
s=3D"gmail_quote">On Thu, Apr 12, 2012 at 2:08 PM, Dmitry Kurochkin <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:dmitry.kurochkin-LbpN3Auhdh+Rtz+nHKFJDvXmoG9oyoYx@public.gmane.org" =
target=3D"_blank">dmitry.kurochkin-LbpN3Auhdh+Rtz+nHKFJDvXmoG9oyoYx@public.gmane.org</a>&gt;</span> w=
rote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Hi Jacky.<br>
<div class=3D"im"><br>
unjc email &lt;<a href=3D"mailto:[email protected]">[email protected]=
</a>&gt; writes:<br>
<br>
&gt; Hi there,<br>
&gt;<br>
&gt; I have followed the Realistic content simulation manual to try to<br>
&gt; create realistic image contents. =A0Here are what I have done:<br>
&gt;<br>
&gt; 1. =A0Created cdb file<br>
&gt; I have created cdb file that contains jpg image files only.<br>
&gt;&gt; polygraph-4.3.1/src/csm/cdb --add wp.cdb media/*.jpg<br>
&gt;<br>
&gt; Question: Can I add different file types (.jpg, .gif, .png) and kinds<=
br>
&gt; (.flv, .html, .swf) into the cdb file?<br>
&gt;<br>
<br>
</div>PGL ContentType uses all objects in the given cdb database. =A0You ca=
n add<br>
any files to a single cdb database but PGL ContentType would not<br>
distinguish between them which is probably not what you want.<br>
<div class=3D"im"><br>
&gt;<br>
&gt; 2. =A0add a PGL ContentType for images from that database<br>
&gt;<br>
&gt; Content ImageContent =3D {<br>
&gt; =A0 =A0 kind =3D &quot;image&quot;;<br>
&gt; =A0 =A0 mime =3D { type =3D &quot;image/jpeg&quot;; extensions =3D [ &=
quot;.jpg&quot; ]; };<br>
&gt; =A0 =A0 //obj_life_cycle =3D olcImage;<br>
&gt; =A0 =A0 //size =3D const(13KB);<br>
&gt; =A0 =A0 cachable =3D 0%;<br>
&gt; =A0 =A0 checksum =3D 1%;<br>
&gt; =A0 =A0 content_db =A0=3D &quot;workloads/wp.cdb&quot;; // import cont=
ent templateS<br>
&gt; };<br>
&gt;<br>
&gt; Server S =3D {<br>
&gt; =A0 =A0 kind =3D &quot;S101&quot;;<br>
&gt; =A0 =A0 contents =3D [ ImageContent ];<br>
&gt; =A0 =A0 direct_access =3D contents;<br>
&gt; =A0 =A0 ...<br>
&gt;<br>
&gt;<br>
&gt; I download an image from one of the URLs and try to view it on a<br>
&gt; browser; but the image is shown broken.<br>
&gt; <a href=3D"http://hostname:9090/w1925a4f2.210b3b17:00000008/t03/_00000=
003.jpg" target=3D"_blank">http://hostname:9090/w1925a4f2.210b3b17:00000008=
/t03/_00000003.jpg</a><br>
&gt;<br>
<br>
</div>You should use &quot;--format verbatim&quot; option when adding image=
s to cdb<br>
database. =A0This would<br>
<br>
Regards,<br>
=A0 Dmitry<br>
<div class=3D"im"><br>
&gt;<br>
&gt; Please advise if I have missed any step in creating the realistic<br>
&gt; image contents.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Jacky<br>
</div>&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href=3D"mailto:Users-mN9fGWdlm5pku/f+YMZH/di2O/[email protected]">Users-mN9fGWdlm5pku/f+YMZH/di2O/[email protected]</a>=
<br>
&gt; <a href=3D"http://www.web-polygraph.org/mailman/listinfo/users" target=
=3D"_blank">http://www.web-polygraph.org/mailman/listinfo/users</a><br>
</blockquote></div><br></div>

--047d7bb03ff82b528b04e3768e94--

--===============1511018080==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Users mailing list
Users-mN9fGWdlm5pku/f+YMZH/di2O/[email protected]
http://www.web-polygraph.org/mailman/listinfo/users

--===============1511018080==--