// makedata.c
// written by mnagaku @ 2006/04/27
// ダミーデータを生成します
// データ形式は次のとおり
// id, worker, change_line_count, commit_date

#include <stdlib.h>
#include <stdio.h>
#include <time.h>

#define MAX_LINE 100000

void main() {
    int i;
    int year = 2000;
    int month = 1;
    int day = 1;
    int hour = 0;
    int minutes = 0;
    int second = 0;

    srand(time(NULL));

    for(i = 0; i < MAX_LINE; i++) {
        second = (second + rand()) % 60;
        minutes += rand() % 60 + 1;
        if(minutes >= 60) {
            minutes %= 60;
            hour++;
        }
        if(hour >= 24) {
            hour %= 24;
            day++;
        }
        if(day >= 29) {
            day = 1;
            month++;
        }
        if(month >= 13) {
            month = 1;
            year++;
        }
        printf("%d,%c%c,%d,%04d-%02d-%02d %02d:%02d:%02d,\n",
            i + 1, (rand() % 2) ? ('a' + rand() % 26) : ('A' + rand() % 26),
            (rand() % 2) ? ('a' + rand() % 26) : ('A' + rand() % 26),
            rand() % 100 + 1, year, month, day, hour, minutes, second);
    }
}