ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] статистика
Date: Fri, 24 Aug 2007 00:25:56 +0400
Message-ID: <20070823202556.GG6155@solemn.turbinal> (raw)
In-Reply-To: <20070823190529.GE6155@solemn.turbinal>


[-- Attachment #1.1: Type: text/plain, Size: 1055 bytes --]

On Thu, Aug 23, 2007 at 11:05:29PM +0400, Alexey Tourbin wrote:
> (ВРЕМЯ СБОРКИ СЛУЧАЙНО ВЫБРАННЫХ N src.rpm ПАКЕТОВ) <=
> 	N * (среднее + 2*сигма/sqrt(N))
> где
> 	среднее = 74 секунды
> 	сигма = 189 секунда
> неравенство выполняется с вероятностью около 90%.

Численный эксперимент показывает, что надежность формулы около 95%.

$ perl test-buildtime.pl <buildtime
mean=74.3942971025606
devi=189.240149227661
   5 packages:  955/1000 = 95.5%
  10 packages:  948/1000 = 94.8%
  50 packages:  959/1000 = 95.9%
 100 packages:  952/1000 = 95.2%
 500 packages:  972/1000 = 97.2%
1000 packages:  973/1000 = 97.3%
5000 packages: 1000/1000 = 100.0%
$ perl test-buildtime.pl <buildtime
mean=74.3942971025606
devi=189.240149227661
   5 packages:  950/1000 = 95.0%
  10 packages:  943/1000 = 94.3%
  50 packages:  954/1000 = 95.4%
 100 packages:  957/1000 = 95.7%
 500 packages:  970/1000 = 97.0%
1000 packages:  983/1000 = 98.3%
5000 packages: 1000/1000 = 100.0%
$ wc -l buildtime
6523 buildtime
$

(test-buildtime.pl приложен)

[-- Attachment #1.2: test-buildtime.pl --]
[-- Type: text/plain, Size: 704 bytes --]

#!/usr/bin/perl
use strict;
use Statistics::Descriptive;
my $stats = Statistics::Descriptive::Full->new();
while (<>) {
	my @v = split;
	$stats->add_data(0+$v[-1]);
}

my $mean = $stats->mean();
my $devi = $stats->standard_deviation();
print "mean=$mean\n";
print "devi=$devi\n";

my @times = $stats->get_data();

sub calc_90_time ($) {
	my $N = shift;
	return $N * ($mean + 2*$devi/sqrt($N));
}

use List::Util qw(shuffle sum);
for my $N (5, 10, 50, 100, 500, 1000, 5000) {
	my $time = calc_90_time($N);
	my $n_ok = 0;
	for (1 .. 1000) {
		@times = shuffle(@times);
		my $sum = sum @times[1 .. $N];
		$n_ok++ if $sum <= $time;
	}
	printf "%4d packages: %4d/1000 = %.1f%\n", $N, $n_ok, 100*$n_ok/1000;
}

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-08-23 20:25 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 21:43 [devel] RFC: тестирование входящих пакетов полной пересборкой сизифа Alexey Tourbin
2007-08-22  5:25 ` Денис Смирнов
2007-08-22  8:22   ` Хихин Руслан
2007-08-23 10:19 ` Alexey Tourbin
2007-08-23 11:10   ` Michael Shigorin
2007-08-23 11:16     ` Mykola S. Grechukh
2007-08-23 11:18       ` Mykola S. Grechukh
2007-08-23 11:52         ` [devel] [JT] " Michael Shigorin
2007-08-23 12:10           ` Mykola S. Grechukh
2007-08-23 12:11             ` Michael Shigorin
2007-08-23 12:32               ` Alexey Tourbin
2007-08-23 19:05                 ` [devel] статистика Alexey Tourbin
2007-08-23 20:25                   ` Alexey Tourbin [this message]
2007-08-23 20:37                   ` Vadim V. Zhytnikov
2007-08-23 19:51                     ` Alexey Tourbin
2007-08-23 21:03                     ` Alexey Tourbin
2007-08-23 21:08                   ` Хихин Руслан
2007-08-23 21:47                     ` Alexey Tourbin
2007-08-23 21:59                       ` Alexey Tourbin
2007-08-23 22:19                       ` Alexey Tourbin
2007-08-23 12:19           ` [devel] [JT] Re: RFC: тестирование входящих пакетов полной пересборкой сизифа Alexey Tourbin
2007-08-23 13:12             ` Michael Shigorin
2007-08-24 11:15               ` Alexey Tourbin
2007-08-25  9:15                 ` Alexey I. Froloff
2007-08-25  9:33                   ` Alexey Tourbin
2007-08-25 10:16                     ` Alexey I. Froloff
2007-08-25 11:25                       ` Igor Vlasenko
2007-08-25 11:36                         ` Igor Vlasenko
2007-08-25 11:48                           ` Michael Shigorin
2007-08-25 11:53                             ` Mykola S. Grechukh
2007-08-25 21:58                               ` Igor Vlasenko
2007-08-25 22:43                                 ` Alexey Tourbin
2007-08-25 23:35                                   ` Igor Vlasenko
2007-08-26 13:38                                   ` Alexey I. Froloff
2007-08-25 18:33                       ` Alexey Tourbin
2007-08-25 19:32                         ` [devel] incominger Michael Shigorin
2007-08-25 20:13                         ` [devel] [JT] Re: RFC: тестирование входящих пакетов полной пересборкой сизифа Денис Смирнов
2007-08-23 13:23   ` [devel] " Alexey Tourbin
2007-08-24 12:51     ` Alexey Tourbin
2007-08-24 21:23     ` [devel] статистика [2] Alexey Tourbin
2007-08-25 14:57       ` [devel] Критерий значимости пакета (Was: статистика) Alexey Rusakov
2007-08-25 20:10         ` Денис Смирнов
2007-08-25 20:28           ` Alexey Tourbin
2007-08-25 22:47             ` Денис Смирнов
2007-08-25 23:55               ` Alexey Tourbin
2007-08-29 20:39       ` [devel] статистика [2] Dmitry V. Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070823202556.GG6155@solemn.turbinal \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git