[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: [Kde-pim] Testing many appointments
From: Bernhard Reiter <bernhard () intevation ! de>
Date: 2003-07-21 18:33:18
[Download RAW message or body]
On Sunday 20 July 2003 23:39, Cornelius Schumacher wrote:
> On Sunday 20 July 2003 19:29, Mark Bucciarelli wrote:
> > Has anybody put 5,000 events into KOrganizer to see what happens to
> > memory usage and performance?
>
> If there are problems with 5000 events we have to fix them.
I've tested a couple of hundreds for Kroupware.
If you want to test more, the attached script might be interesting for you.
Adjust starttimestring
and how_many
to get more than the 168 appointments per day.
["day_appointment-0.1.py" (text/x-python)]
#!/bin/env python
"""Create many ical appoints for testing Kroupware.
bernhard@intevation.de
"""
__version__=0.1
import time
# note because of the inverse time conversion functions
# mktime() and localtime() this _might_ behave differently from UTC
startingtimestring="20030615T224600Z"
increment_seconds=60*5
basenumber=100
how_many=12*14 # 14 hours
t=time.strptime(startingtimestring,"%Y%m%dT%H%M%SZ")
seconds=time.mktime(t)
header="""
BEGIN:VCALENDAR
PRODID
:-//K Desktop Environment//NONSGML libkcal 3.1//EN
VERSION
:2.0"""
footer="""END:VCALENDAR"""
dayfmt="""BEGIN:VEVENT
ORGANIZER
:MAILTO:bernhard8.reiter@kolab.konsec.com
ATTENDEE
;CN=Bernhard8 Reiter
;RSVP=FALSE
;PARTSTAT=ACCEPTED
;ROLE=REQ-PARTICIPANT
:mailto:bernhard8.reiter@kolab.konsec.com
SEQUENCE
:0
DESCRIPTION
:Mass test
SUMMARY
:A five minute appointment #%d
CLASS
:PUBLIC
PRIORITY
:3
DTSTART
:%s
DTEND
:%s
TRANSP
:OPAQUE
BEGIN:VALARM
DESCRIPTION
:
ACTION
:DISPLAY
TRIGGER
;VALUE=DURATION
:-PT1M
END:VALARM
END:VEVENT"""
print header
for i in range(how_many):
starts=seconds+increment_seconds*i
stops=seconds+increment_seconds*(i+1)
starttime=time.strftime("%Y%m%dT%H%M%SZ", time.localtime(starts))
endtime= time.strftime("%Y%m%dT%H%M%SZ", time.localtime(stops))
day= dayfmt % (basenumber+i,starttime, endtime)
print day
print footer
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic