Author Topic: time during compiling  (Read 2846 times)

TeLLie

  • Sr. Member
  • ****
  • Posts: 278
  • Karma: +16/-0
    • View Profile
time during compiling
« on: December 20, 2024, 06:48:23 pm »
Hello all,

I was wondering if its possible to add a time to see howlong a build takes.
f.e
I have a build cmd like:

#!/bin/sh
NCORES=$(nproc)
MAXCORES=$(( NCORES - 5 ))
NJS=$(( MAXCORES > 1 ? MAXCORES : 1 ))
echo "Cleaning previous compiled files..."
rm -r qmake-qt6-gcc1420
echo "Make a new directory..."
mkdir qmake-qt6-gcc1420
cd qmake-qt6-gcc1420
echo "Creating the Makefile..."
qmake6 ../ -r -spec os2-g++ -r CONFIG+="release" 2>&1 |tee qmake.out
echo "Compiling the programma with $NJS threads ($NCORES cores)..."
make -j$NJS 2>&1 |tee make.out
echo "Done."

I like to see how long a compiling takes in time
So is it possible to add some strings in this cmd  ??
As i have no idea how to add or what string to use.
Could someone helps me out

With kind regards, TeLLie


Dave Yeo

  • Hero Member
  • *****
  • Posts: 5355
  • Karma: +127/-1
    • View Profile
Re: time during compiling
« Reply #1 on: December 20, 2024, 08:32:45 pm »
I use timex.exe from the old AIX like package, attached.
timex build.cmd or timex make, etc.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5255
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: time during compiling
« Reply #2 on: December 20, 2024, 08:55:49 pm »
Hello Dave

The TIMEX you posted is from 1995-03-02 (26.1KB). On Hobbes there is "AIXTools_1997-01-25.zip" with TIMEX 1996-01-12 (26.9 KB). I guess both are the same with different compile times, right?

Sorry if I'm being annoying, It is just because I like collecting the software.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5355
  • Karma: +127/-1
    • View Profile
Re: time during compiling
« Reply #3 on: December 20, 2024, 09:57:45 pm »
I'd assume they're the same code, it is a pretty simple program. Possible some other utility was updated.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 398
  • Karma: +30/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: time during compiling
« Reply #4 on: December 21, 2024, 12:05:40 am »
I was wondering if its possible to add a time to see howlong a build takes.

I use:

Code: [Select]
@date.exe > ..\bld.log
@cmake --build . --parallel 6  | tee -a ..\bld.log
@date.exe >> ..\bld.log

'date.exe' is the standard *nix util, not the OS/2 "date" command

TeLLie

  • Sr. Member
  • ****
  • Posts: 278
  • Karma: +16/-0
    • View Profile
Re: time during compiling
« Reply #5 on: December 22, 2024, 08:50:26 am »
Thankz all,
Will see what to use...
As i prefer to get the output in min/secs

Wish all a merry Xmas, and all the best for 2025

Alfredo Fernández Díaz

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +4/-0
    • View Profile
Re: time during compiling
« Reply #6 on: February 26, 2025, 08:14:21 pm »
Hi TeLLie,

just in case you want to have a look, i have posted a simple solution for this in the REXX tutorials thread.