В продолжение своего не сыскавшего популярности треда https://forum.ubuntu.ru/index.php?topic=317844.0, хочу предложить вам тест CPU и эффективности ПО, которую можно замерить лишь ретроспективно – через время на том же железе.
Вам понадобится архив https://drive.google.com/drive/folders/16ohnV7Ol5TZgexVVPsUT9h2EC0mOmLkL?usp=sharing и пакеты:
inxi ocrmypdf tesseract-ocr-eng tesseract-ocr-rus xsensors
Как нужно запускать тестирование:
English Directory Structure:
# English Directory Structure:
inxi -b && sensors && cd $HOME/Public/Books/Geografia-03-1938/ && chmod +x ./time.sh && sh ./time.sh && sensors # https://www.linux.org.ru/forum/linux-hardware/17333009
Russian Directory Structure:
# Russian Directory Structure:
inxi -b && sensors && cd $HOME/Общедоступные/Books/Geografia-03-1938/ && chmod +x ./time.sh && sh ./time.sh && sensors # https://www.linux.org.ru/forum/linux-hardware/17333009
[dragonserw@fedora ~]$ inxi -b && sensors && cd $HOME/Public/Books/Geografia-03-1938/ && chmod +x ./time.sh && sh ./time.sh && sensors
System:
Host: fedora Kernel: 6.4.11-200.fc38.x86_64 arch: x86_64 bits: 64
Desktop: GNOME v: 44.4 Distro: Fedora release 38 (Thirty Eight)
Machine:
Type: Desktop System: Dell product: OptiPlex 3080 v: N/A
serial: <superuser required>
Mobo: Dell model: 0J2J3Y v: A00 serial: <superuser required> UEFI: Dell
v: 2.19.1 date: 05/10/2023
CPU:
Info: 6-core Intel Core i5-10500T [MT MCP] speed (MHz): avg: 2175
min/max: 800/3800
Graphics:
Device-1: Intel CometLake-S GT2 [UHD Graphics 630] driver: i915 v: kernel
Device-2: Logitech B525 HD Webcam driver: snd-usb-audio,uvcvideo type: USB
Display: wayland server: X.Org v: 22.1.9 with: Xwayland v: 22.1.9
compositor: gnome-shell driver: dri: iris gpu: i915
resolution: 1920x1080~60Hz
API: OpenGL v: 4.6 Mesa 23.1.6 renderer: Mesa Intel UHD Graphics 630 (CML
GT2)
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
driver: r8169
Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi
Drives:
Local Storage: total: 462.05 GiB used: 73.26 GiB (15.9%)
Info:
Processes: 349 Uptime: 2d 6h 49m Memory: total: 16 GiB available: 15.35 GiB
used: 2.51 GiB (16.4%) Shell: Bash inxi: 3.3.29
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +39.0°C (high = +80.0°C, crit = +100.0°C)
Core 0: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 1: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 2: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 3: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 4: +35.0°C (high = +80.0°C, crit = +100.0°C)
Core 5: +36.0°C (high = +80.0°C, crit = +100.0°C)
acpitz-acpi-0
Adapter: ACPI interface
temp1: +27.8°C (crit = +119.0°C)
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1: N/A
nvme-pci-0100
Adapter: PCI adapter
Composite: +32.9°C (low = -273.1°C, high = +82.8°C)
(crit = +86.8°C)
Sensor 1: +32.9°C (low = -273.1°C, high = +65261.8°C)
Scanning contents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 131/131 0:00:00
Start processing 12 pages concurrently _sync.py:259
14 lots of diacritics - possibly poor OCR tesseract.py:259
20 lots of diacritics - possibly poor OCR tesseract.py:259
24 lots of diacritics - possibly poor OCR tesseract.py:259
22 lots of diacritics - possibly poor OCR tesseract.py:259
32 lots of diacritics - possibly poor OCR tesseract.py:259
31 lots of diacritics - possibly poor OCR tesseract.py:259
43 lots of diacritics - possibly poor OCR tesseract.py:259
48 lots of diacritics - possibly poor OCR tesseract.py:259
52 lots of diacritics - possibly poor OCR tesseract.py:259
59 lots of diacritics - possibly poor OCR tesseract.py:259
68 lots of diacritics - possibly poor OCR tesseract.py:259
82 lots of diacritics - possibly poor OCR tesseract.py:259
90 lots of diacritics - possibly poor OCR tesseract.py:259
96 lots of diacritics - possibly poor OCR tesseract.py:259
102 lots of diacritics - possibly poor OCR tesseract.py:259
107 lots of diacritics - possibly poor OCR tesseract.py:259
112 lots of diacritics - possibly poor OCR tesseract.py:259
122 lots of diacritics - possibly poor OCR tesseract.py:259
123 lots of diacritics - possibly poor OCR tesseract.py:259
127 lots of diacritics - possibly poor OCR tesseract.py:259
125 lots of diacritics - possibly poor OCR tesseract.py:259
126 lots of diacritics - possibly poor OCR tesseract.py:259
OCR ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 131/131 0:00:00
Postprocessing... _sync.py:307
Recompressing JPEGs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% 0/0 -:--:--
Deflating JPEGs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 3/3 0:00:00
JBIG2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% 0/0 -:--:--
Image optimization ratio: 1.00 savings: 0.5% _pipeline.py:936
Total file size ratio: 5.69 savings: 82.4% _pipeline.py:939
Output file is a PDF/A-2B (as expected) _sync.py:405
It took 58 seconds
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +50.0°C (high = +80.0°C, crit = +100.0°C)
Core 0: +47.0°C (high = +80.0°C, crit = +100.0°C)
Core 1: +45.0°C (high = +80.0°C, crit = +100.0°C)
Core 2: +46.0°C (high = +80.0°C, crit = +100.0°C)
Core 3: +49.0°C (high = +80.0°C, crit = +100.0°C)
Core 4: +45.0°C (high = +80.0°C, crit = +100.0°C)
Core 5: +48.0°C (high = +80.0°C, crit = +100.0°C)
acpitz-acpi-0
Adapter: ACPI interface
temp1: +27.8°C (crit = +119.0°C)
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1: N/A
nvme-pci-0100
Adapter: PCI adapter
Composite: +32.9°C (low = -273.1°C, high = +82.8°C)
(crit = +86.8°C)
Sensor 1: +32.9°C (low = -273.1°C, high = +65261.8°C)
[dragonserw@fedora Geografia-03-1938]$
Как видно, прдудыщий мой результат i5-10500T – 66 секунд. Текущий результат на том же самом CPU – 58 секунд.
Сам скрипт time.sh
:
#!/bin/bash
START_TIME=$(date +%s)
# do something
ocrmypdf -l eng+rus geografia-03-1938.pdf OCRmyPDF-geografia-03-1938.pdf
# in this block
END_TIME=$(date +%s)
DIFF=$(( $END_TIME - $START_TIME ))
echo "It took $DIFF seconds"