1 // Copyright 2009 The RE2 Authors. All Rights Reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 #include <sys/resource.h>
11 DEFINE_string(test_tmpdir
, "/var/tmp", "temp directory");
18 static Test tests
[10000];
21 void RegisterTest(void (*fn
)(void), const char *name
) {
22 tests
[ntests
].fn
= fn
;
23 tests
[ntests
++].name
= name
;
27 int64
VirtualProcessSize() {
30 getrusage(RUSAGE_SELF
, &ru
);
31 return (int64
)ru
.ru_maxrss
*1024;
38 int main(int argc
, char **argv
) {
39 for (int i
= 0; i
< ntests
; i
++) {
40 printf("%s\n", tests
[i
].name
);