2021-11-07 10:41:55 +01:00
|
|
|
## Copyright (C) 2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
|
|
|
##
|
|
|
|
## This program is free software; you can redistribute it and/or modify
|
|
|
|
## it under the terms of the GNU General Public License as published by
|
|
|
|
## the Free Software Foundation; either version 3 of the License, or
|
|
|
|
## (at your option) any later version.
|
|
|
|
##
|
|
|
|
## This program is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
## GNU General Public License for more details.
|
|
|
|
##
|
|
|
|
## You should have received a copy of the GNU General Public License
|
|
|
|
## along with this program; if not, write to the Free Software Foundation,
|
|
|
|
## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
#
|
|
|
|
# tests
|
|
|
|
#
|
2022-02-19 23:38:13 +01:00
|
|
|
test('test-maildir',
|
2021-11-07 10:41:55 +01:00
|
|
|
executable('test-maildir',
|
|
|
|
'test-mu-maildir.cc',
|
|
|
|
install: false,
|
|
|
|
dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep]))
|
2022-02-19 23:38:13 +01:00
|
|
|
test('test-msg',
|
2021-11-07 10:41:55 +01:00
|
|
|
executable('test-msg',
|
|
|
|
'test-mu-msg.cc',
|
|
|
|
install: false,
|
|
|
|
dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep]))
|
2022-02-19 23:38:13 +01:00
|
|
|
test('test-store',
|
2021-11-07 10:41:55 +01:00
|
|
|
executable('test-store',
|
|
|
|
'test-mu-store.cc',
|
|
|
|
install: false,
|
|
|
|
dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep]))
|
2022-02-19 23:38:13 +01:00
|
|
|
test('test-query',
|
2021-11-07 10:41:55 +01:00
|
|
|
executable('test-query',
|
|
|
|
'test-query.cc',
|
|
|
|
install: false,
|
2022-03-20 13:12:41 +01:00
|
|
|
dependencies: [glib_dep, gmime_dep, lib_mu_dep, lib_test_mu_common_dep]))
|
2021-11-07 10:41:55 +01:00
|
|
|
|
2022-02-19 23:38:13 +01:00
|
|
|
test('test-tokenizer',
|
2021-11-07 10:41:55 +01:00
|
|
|
executable('test-tokenizer',
|
|
|
|
'test-tokenizer.cc',
|
|
|
|
install: false,
|
|
|
|
dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep]))
|
2022-02-19 10:55:31 +01:00
|
|
|
|
2022-02-19 23:38:13 +01:00
|
|
|
test('test-parser',
|
2021-11-07 10:41:55 +01:00
|
|
|
executable('test-parser',
|
|
|
|
'test-parser.cc',
|
|
|
|
install: false,
|
2022-03-20 13:12:41 +01:00
|
|
|
dependencies: [glib_dep, gmime_dep, lib_mu_dep, lib_test_mu_common_dep]))
|
bench-store-index: make a bit more realistic
```
.',;::::;,'. djcb@evergrey
.';:cccccccccccc:;,. -------------
.;cccccccccccccccccccccc;. OS: Fedora release 36 (Thirty Six) x86_64
.:cccccccccccccccccccccccccc:. Host: MS-7B09 2.0
.;ccccccccccccc;.:dddl:.;ccccccc;. Kernel: 5.17.11-300.fc36.x86_64
.:ccccccccccccc;OWMKOOXMWd;ccccccc:. Uptime: 6 hours, 16 mins
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:. Packages: 4340 (rpm), 70 (flatpak)
,cccccccccccccc;MMM.;cc;;WW::cccccccc, Shell: zsh 5.8.1
:cccccccccccccc;MMM.;cccccccccccccccc: Resolution: 3840x2160
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc: WM: sway
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc; Theme: Adwaita [GTK2]
ccccc:XM0';cccc;MMM.;cccccccccccccccc' Icons: Adwaita [GTK2]
ccccc;MMo;ccccc;MMW.;ccccccccccccccc; Terminal: tilix
ccccc;0MNc.ccc.xMMd:ccccccccccccccc; CPU: AMD Ryzen Threadripper 1950X (32) @ 3.399GHz
cccccc;dNMWXXXWM0::cccccccccccccc:, GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
cccccccc;.:odl:.;cccccccccccccc:,. Memory: 7101MiB / 15881MiB
:cccccccccccccccccccccccccccc:'.
.:cccccccccccccccccccccc:;,..
'::cccccccccccccc::;,.
```
% make benchmark
ninja -C /home/djcb/Sources/mu/build benchmark
ninja: Entering directory `/home/djcb/Sources/mu/build'
[0/1] Running benchmark suite.
1/1 bench-store-index OK 17.40s
2022-06-05 15:40:12 +02:00
|
|
|
|
2022-06-08 23:00:59 +02:00
|
|
|
test('test-store-query',
|
|
|
|
executable('test-store-query',
|
|
|
|
'test-mu-store-query.cc',
|
|
|
|
install: false,
|
|
|
|
dependencies: [glib_dep, gmime_dep, lib_mu_dep, lib_test_mu_common_dep]))
|
2022-05-27 20:06:29 +02:00
|
|
|
#
|
|
|
|
# benchmarks
|
|
|
|
#
|
|
|
|
bench_maildirs=join_paths(meson.current_build_dir(), 'maildirs')
|
|
|
|
bench_store=join_paths(meson.current_build_dir(), 'store')
|
bench-store-index: make a bit more realistic
```
.',;::::;,'. djcb@evergrey
.';:cccccccccccc:;,. -------------
.;cccccccccccccccccccccc;. OS: Fedora release 36 (Thirty Six) x86_64
.:cccccccccccccccccccccccccc:. Host: MS-7B09 2.0
.;ccccccccccccc;.:dddl:.;ccccccc;. Kernel: 5.17.11-300.fc36.x86_64
.:ccccccccccccc;OWMKOOXMWd;ccccccc:. Uptime: 6 hours, 16 mins
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:. Packages: 4340 (rpm), 70 (flatpak)
,cccccccccccccc;MMM.;cc;;WW::cccccccc, Shell: zsh 5.8.1
:cccccccccccccc;MMM.;cccccccccccccccc: Resolution: 3840x2160
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc: WM: sway
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc; Theme: Adwaita [GTK2]
ccccc:XM0';cccc;MMM.;cccccccccccccccc' Icons: Adwaita [GTK2]
ccccc;MMo;ccccc;MMW.;ccccccccccccccc; Terminal: tilix
ccccc;0MNc.ccc.xMMd:ccccccccccccccc; CPU: AMD Ryzen Threadripper 1950X (32) @ 3.399GHz
cccccc;dNMWXXXWM0::cccccccccccccc:, GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
cccccccc;.:odl:.;cccccccccccccc:,. Memory: 7101MiB / 15881MiB
:cccccccccccccccccccccccccccc:'.
.:cccccccccccccccccccccc:;,..
'::cccccccccccccc::;,.
```
% make benchmark
ninja -C /home/djcb/Sources/mu/build benchmark
ninja: Entering directory `/home/djcb/Sources/mu/build'
[0/1] Running benchmark suite.
1/1 bench-store-index OK 17.40s
2022-06-05 15:40:12 +02:00
|
|
|
bench_indexer_exe = executable(
|
|
|
|
'bench-indexer',
|
|
|
|
'bench-indexer.cc',
|
|
|
|
install:false,
|
|
|
|
cpp_args:['-DBENCH_MAILDIRS="' + bench_maildirs + '"',
|
|
|
|
'-DBENCH_STORE="' + bench_store + '"',
|
|
|
|
],
|
|
|
|
dependencies: [lib_mu_dep, glib_dep])
|
|
|
|
|
|
|
|
benchmark('bench-indexer', bench_indexer_exe, args: ['-m', 'perf'])
|
|
|
|
|
|
|
|
#
|
|
|
|
# below does _not_ pass; it is believed that it's a false alarm.
|
|
|
|
# https://gitlab.gnome.org/GNOME/glib/-/issues/2662
|
|
|
|
|
|
|
|
# also register benchmark as a normal test so it gets included for
|
|
|
|
# valgrind/helgrind etc.
|
|
|
|
# test('test-bench-indexer', bench_indexer_exe,
|
|
|
|
# args : ['-m', 'quick'], env: ['THREADNUM=16'])
|