سلام
راههای زیادی هست.
۱- با دستور Measure-Command:
در PowerShell بزنین.
Measure-Command {xelatex main-file-name.tex}
خروجی:
Measure-Command {xelatex sample2e.tex}
Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 9
Milliseconds      : 927
Ticks             : 99273966
TotalDays         : 0.000114900423611111
TotalHours        : 0.00275761016666667
TotalMinutes      : 0.16545661
TotalSeconds      : 9.9273966
TotalMilliseconds : 9927.3966
۲- با بسته l3benchmark:
\RequirePackage{etoolbox}
\RequirePackage{l3benchmark}
\ExplSyntaxOn
\AfterEndDocument { \benchmark_toc: }
\use:n
  {
    \ExplSyntaxOff
    \benchmark_tic:
  }
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[1-200]
\end{document}
در فایل log مینویسه: (آخر فایل گزارش و خط اول کد زیر)
(l3benchmark) + TOC: 6.26 s
 ) 
Here is how much of TeX's memory you used:
 1331 strings out of 479418
 28887 string characters out of 5884145
 542514 words of memory out of 5000000
 18904 multiletter control sequences out of 15000+600000
 532346 words of font info for 25 fonts, out of 8000000 for 9000
 1348 hyphenation exceptions out of 8191
 37i,5n,55p,809b,125s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on texstudio_QDVTff.pdf (23 pages).
۳- دستور time در CMD:
cmd /v:on /c "echo !time! & "xelatex sample2e.tex" & echo !time!"
زمان شروع اجرا و زمان پایان اجرا را در ابتدا و انتهای کار مینویسد.
خروجی:
C:\Users\Hadi>cmd /v:on /c "echo !time! & xelatex sample2e.tex & echo !time!"
12:32:11.12
This is XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020/W32TeX) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(d:/p/texlive/2020/iso/texmf-dist/tex/latex/base/sample2e.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(d:/p/texlive/2020/iso/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(d:/p/texlive/2020/iso/texmf-dist/tex/latex/base/size10.clo))
(d:/p/texlive/2020/iso/texmf-dist/tex/latex/l3backend/l3backend-xdvipdfmx.def)
(./sample2e.aux) (d:/p/texlive/2020/iso/texmf-dist/tex/latex/base/ts1cmr.fd)
[1] [2] [3] (./sample2e.aux) )
Output written on sample2e.pdf (3 pages).
Transcript written on sample2e.log.
12:32:17.49
C:\Users\Hadi>
البته میشه bath file نوشت که این دو رو از هم کم و زمان سپریشده رو به ما بده.
موفقتر باشین.