Files correlati : ba1.exe Ricompilazione Demo : [ ] Commento : AO20113 In fase di installazione moduli su un client con "Installazione di rete con programmi su disco locale" non viene creata la cartella HTMLHELP, su ogni modulo viene pertanto restituito l'errore: "Impossibile creare il file htmlhelp\XXhelp.zip per copiare il file F:\Campo32\htmlhelp\XXhelp.zip" dove la XX sta ad indicare il modulo in questione ed F:\ è il percorso del server. Sul server nell'installazione standard invece è tutto corretto. AO20114 In fase di installazione moduli su un client con "Installazione di rete con programmi su disco locale" non vengono "unzippati" i files necessari per l'installazione dell'Help On-Line e non vengono nemmeno create le cartelle dentro le quali scompattare questi files (ba, ve, cg, ecc ); nonostante la segnalazione AO20113 ho potuto verificare questa cosa creando a mano, in fase di installazione, la cartella HTMLHELP e la cartella HTMLHELP\BA. L'unica cosa che viene riportata dal server sono i files .ZIP dell'help di ogni modulo. git-svn-id: svn://10.65.10.50/trunk@11530 c028cbd2-c16b-5b4b-a496-9718f37d4682
152 lines
3.2 KiB
C++
Executable File
152 lines
3.2 KiB
C++
Executable File
#include <time.h>
|
|
|
|
#include <applicat.h>
|
|
#include <progind.h>
|
|
#include <relation.h>
|
|
#include <urldefid.h>
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// Testfile
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TTest_application : public TSkeleton_application
|
|
{
|
|
protected:
|
|
void test1();
|
|
void test2();
|
|
void test3();
|
|
|
|
clock_t start_timer() const;
|
|
|
|
public:
|
|
virtual void main_loop();
|
|
};
|
|
|
|
clock_t TTest_application::start_timer() const
|
|
{
|
|
clock_t t = clock();
|
|
while (clock() == t);
|
|
t = clock();
|
|
return t;
|
|
}
|
|
|
|
void TTest_application::test1()
|
|
{
|
|
TLocalisamfile tab(LF_COMUNI);
|
|
const TRecnotype n = tab.items();
|
|
|
|
clock_t start;
|
|
TRecnotype r = 0;
|
|
TString80 msg;
|
|
{
|
|
const int times = 10;
|
|
TProgind p(times, TR("Lettura file comuni"), TRUE, TRUE);
|
|
start = start_timer();
|
|
for (int i = 0; i < times; i++)
|
|
{
|
|
for (tab.first(); tab.good(); tab.next())
|
|
r++;
|
|
|
|
msg.format("%ld records %ld msec", r, clock() - start);
|
|
p.addstatus(1);
|
|
p.set_text(msg);
|
|
if (p.iscancelled())
|
|
break;
|
|
}
|
|
}
|
|
const clock_t t = clock() - start;
|
|
msg.format("Lettura file comuni\n"
|
|
"%ld records in %ld msec\n%lg records per sec", r, t, 1000.0*r/t);
|
|
message_box(msg);
|
|
}
|
|
|
|
void TTest_application::test2()
|
|
{
|
|
TRelation rel(LF_COMUNI);
|
|
TCursor tab(&rel);
|
|
|
|
const TRecnotype n = tab.items();
|
|
|
|
tab.freeze();
|
|
|
|
clock_t start;
|
|
TRecnotype r = 0;
|
|
TString80 msg;
|
|
{
|
|
const int times = 10;
|
|
TProgind p(times, TR("Lettura cursore comuni"), TRUE, TRUE);
|
|
start = start_timer();
|
|
for (int i = 0; i < times; i++)
|
|
{
|
|
for (tab = 0; tab.pos() < n; ++tab)
|
|
r++;
|
|
|
|
msg.format("Lettura cursore comuni\n%ld records %ld msec", r, clock() - start);
|
|
p.addstatus(1);
|
|
p.set_text(msg);
|
|
if (p.iscancelled())
|
|
break;
|
|
}
|
|
}
|
|
const clock_t t = clock() - start;
|
|
msg.format("%ld records in %ld msec\n%lg records per sec\n",
|
|
r, t, 1000.0*r/t);
|
|
message_box(msg);
|
|
}
|
|
|
|
void TTest_application::test3()
|
|
{
|
|
TRelation rel(LF_COMUNI);
|
|
TSorted_cursor tab(&rel, "CAPCOM|DENCOM");
|
|
|
|
clock_t istart = start_timer();
|
|
const TRecnotype n = tab.items();
|
|
clock_t istop = clock() - istart;
|
|
|
|
tab.freeze();
|
|
|
|
clock_t start;
|
|
TRecnotype r = 0;
|
|
TString256 msg;
|
|
{
|
|
const int times = 10;
|
|
TProgind p(times, TR("Lettura cursore C.A.P."), TRUE, TRUE);
|
|
start = start_timer();
|
|
for (int i = 0; i < times; i++)
|
|
{
|
|
for (tab = 0; tab.pos() < n; ++tab)
|
|
r++;
|
|
|
|
msg.format("Lettura cursore C.A.P.\n%ld records %ld msec", r, clock() - start);
|
|
p.addstatus(1);
|
|
p.set_text(msg);
|
|
if (p.iscancelled())
|
|
break;
|
|
}
|
|
}
|
|
const clock_t t = clock() - start;
|
|
msg.format("%ld records in %ld msec\n%lg records per sec\n"
|
|
"%ld msec for initialization",
|
|
r, t, 1000.0*r/t, istop);
|
|
message_box(msg);
|
|
}
|
|
|
|
|
|
void TTest_application::main_loop()
|
|
{
|
|
test1();
|
|
test2();
|
|
test3();
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
int ba1200(int argc, char** argv)
|
|
{
|
|
TTest_application a;
|
|
a.run(argc, argv, TR("Test File"));
|
|
return 0;
|
|
}
|
|
|