CGIs speed test

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

CGIs speed test

Postby Antonio Linares » Sun May 23, 2021 12:41 pm

small test in C language running on remote Debian server:

test.c
Code: Select all  Expand view
// build it doing: gcc test.c -otest

#include <stdio.h>

int main()
{
   printf( "%s%s\n\n", "Content-Type:", "text/plain" );
   printf( "%s\n", "Hello world from CGI" );

   return 0;
}


You can test it on http://www.modharbour.org/cgi-bin/test
Execution speed: around 100ms

Now, using a small Harbour test:

testh.prg
Code: Select all  Expand view
REQUEST HB_GT_STD_DEFAULT
REQUEST HB_GT_STD

function Main()

   Test()

return nil

procedure HB_GTSYS
return

#pragma BEGINDUMP

#include <hbapi.h>
#include <stdio.h>

HB_FUNC( TEST )
{
   printf( "%s%s\n\n", "Content-Type:", "text/plain" );
   printf( "%s\n", "Hello world from CGI" );
}

#pragma ENDDUMP


You can test it on http://www.modharbour.org/cgi-bin/testh
Execution speed: around 130ms
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 14 guests