# Table of Contents
1. [私の環境で確実に開始時間と log のファイルスタンプが 1 秒以上になる理由](#orgf18a981)
2. [latemk 実行環境など](#org583c89d)
1. [デバッグコード](#org65e50bc)
3. [実験](#org733cec9)
1. [1回目のビルド](#orgb7775a0)
2. [2回目のビルド](#orgf9fca50)
3. [ファイルのアクセス・変更情報や処理時間(概算)](#org9f97ed0)
1. [stat](#org44a9593)
2. [latexmk の処理時間を time で計測](#org8dcb491)
# 私の環境で確実に開始時間と log のファイルスタンプが 1 秒以上になる理由
- Windows は仮想環境に設置され、フォアグラウンドで CPU の負荷をかけている処理が常時動いている
- 重い処理を止めれば、比較的スムーズには動くけど、仮想環境下ではとにかく遅い
- ネットワーク環境は SoftBank Air なので、企業などでの環境と違い遅い
# latemk 実行環境など
作業ディレクトリ |
C:\Users\i-wada\OneDrive\ドキュメント |
perl |
C:\texlive\2022\tlpkg\tlperl\bin\perl |
## デバッグコード
diff C:\texlive\2022\texmf-dist\scripts\latexmk\latexmk.pl latexmk
--- C:\texlive\2022\texmf-dist\scripts\latexmk\latexmk.pl
+++ latexmk
@@ -7041,6 +7041,9 @@
# b. By the file existing and being at least as new as the system
# time at the start of the run.
my $file = shift;
+ my $mymy = get_mtime( $file );
+ print STDERR "DEBUG stat(mtime) $mymy $file\n";
+ print STDERR "DEBUG Prun_time $$Prun_time\n\n";
return exists $generated_log{$file} || $generated_fls{$file}
|| ( -e $file && ( get_mtime( $file ) >= $$Prun_time));
}
# 実験
## 1回目のビルド
C:\Users\i-wada\OneDrive\ドキュメント〉C:\texlive\2022\tlpkg\tlperl\bin\perl -f latexmk -gg --lualatex test.tex
...
Transcript written on test.log.
DEBUG stat(mtime) 1667551511 test.log
DEBUG Prun_time 1667551493
DEBUG stat(mtime) 1667551511 test.fls
DEBUG Prun_time 1667551493
DEBUG stat(mtime) 1667551511 test.fls
DEBUG Prun_time 1667551493
Latexmk: Getting log file 'test.log'
DEBUG stat(mtime) 1667551511 test.fls
DEBUG Prun_time 1667551493
Latexmk: Examining 'test.fls'
PWD line not in UTF-8
Latexmk: ============== Inequiv cwd_fls cwd 'C:/Users/i-wada/OneDrive/繝峨く繝・繝。繝ウ繝・ 'C:/Users/i-wada/OneDrive/ドキュメント'
Latexmk: Examining 'test.log'
Latexmk: Log file says output to 'test.pdf'
## 2回目のビルド
Latexmk: applying rule 'lualatex'...
Rule 'lualatex': File changes, etc:
Changed files, or newly in use since previous run(s):
test.aux
Rule 'lualatex': The following rules & subrules became out-of-date:
lualatex
------------
Run number 2 of rule 'lualatex'
...
SyncTeX written on test.synctex.gz.
Transcript written on test.log.
DEBUG stat(mtime) 1667551532 test.log
DEBUG Prun_time 1667551512
DEBUG stat(mtime) 1667551532 test.fls
DEBUG Prun_time 1667551512
DEBUG stat(mtime) 1667551532 test.fls
DEBUG Prun_time 1667551512
Latexmk: Getting log file 'test.log'
DEBUG stat(mtime) 1667551532 test.fls
DEBUG Prun_time 1667551512
Latexmk: Examining 'test.fls'
PWD line not in UTF-8
Latexmk: ============== Inequiv cwd_fls cwd 'C:/Users/i-wada/OneDrive/繝峨く繝・繝。繝ウ繝・ 'C:/Users/i-wada/OneDrive/ドキュメント'
Latexmk: Examining 'test.log'
Latexmk: Log file says output to 'test.pdf'
## ファイルのアクセス・変更情報や処理時間(概算)
stat |
C:\Users\i-wada\scoop\shims\stat.exe |
time |
C:\Users\i-wada\scoop\shims\time.exe |
### stat
stat -c '%X %Y %Z %n' test.* | マニュアル編集
参考
%X Time of last access as seconds since Epoch
%Y Time of last modification as seconds since Epoch
%Z Time of last change as seconds since Epoch
last access |
last modification |
last change |
|
1667551915 |
1666527678 |
1666523909 |
test.tex |
1667551915 |
1667551532 |
1667549857 |
test.aux |
1667551915 |
1667551532 |
1667549879 |
test.fls |
1667551915 |
1667551532 |
1667549883 |
test.log |
1667551915 |
1667551532 |
1667551502 |
test.synctex.gz |
1667551915 |
1667551532 |
1667551510 |
test.pdf |
1667551915 |
1667551534 |
1667549858 |
test.fdb_latexmk |
### latexmk の処理時間を time で計測
real |
0m 41.49s |
user |
0m 1.68s |
sys |
0m 0.40s |