File: perftest1.in

package info (click to toggle)
courier 0.60.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 52,288 kB
  • ctags: 12,677
  • sloc: ansic: 165,348; cpp: 24,820; sh: 16,410; perl: 6,839; makefile: 3,621; yacc: 289; sed: 16
file content (43 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!@SHELL@
#
# $Id: perftest1.in,v 1.3 2005/02/16 23:42:13 mrsam Exp $
#
# Copyright 1998 - 2005 Double Precision, Inc.  See COPYING for
# distribution information.
# Performance test.
#
# This one will optimize Courier's performance by sending a message
# with complete MIME headers, so that Courier won't have to rewrite it.
#
# Benchmark 1: 1000 messages, 5 receipients per message.
# Start Courier.  Start pushing the messages into the queue.
# Total completion until the last message was delivered: 3 mins 42 seconds.

# Benchmark 2: 1000 messages, 5 receipients per message.
# Submit messages into the queue while Courier is not running.  Start Courier.
# Total time to submit messages into the queue: 32 seconds.
# Total completion until the last message was delivered: 4 mins 52 seconds.

prefix="@prefix@"
exec_prefix="@exec_prefix@"
csendmail="@bindir@/sendmail"

nummessages="$1"
addresses="$2"

n=0

while test $n -lt $1
do
	env -i $csendmail $addresses <<EOF
From: perftest1@example.com
To: perftest1@example.com
Subject: test
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

test $n
EOF
	n=`expr $n + 1`
done