Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOi47-000g5k-9O for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2024 18:17:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sOi37-003Z0Q-2M for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2024 18:16:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOi36-003Z0I-PN for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2024 18:16:17 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sOi35-0005nZ-Al for pgsql-hackers@postgresql.org; Tue, 02 Jul 2024 18:16:16 +0000 Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-4450111d54dso35411cf.0 for ; Tue, 02 Jul 2024 11:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1719944173; x=1720548973; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k9JruDziqQ/uVBz0r2MrTOIAJTHdp68r5Vdq0KyOgbw=; b=Cxaimnvs7k5WlQ3sfQR2sAlOJCS51zoHccj177rOwe0c9sExNStTHTs5oMQS80RP2z hfbU+2eslzIwm3roaAzm3ELh5eR9rRsGC8sAFJ0PlOU1zNFZGZwhD8uPs/SOdn+O/oOh p/W+Es+dG5/8hi4DUQ01kkK1uDyrE6xY1UPhq0V7f0aOisAPs3etIJAP3jTqrXtSkhsz zCgEzeFapnQ50+A2cBdaYSyK165lBvpiUC5cSXHaghv+2i0B0Q1g4uld5kgFQh5/NY9g mZ1ajc/NWT2EKveR1z24YlRDpG4vb7Lmw1XZDk2aziReB3mlt+K2fH/zU13rUR45C5Mg HlkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719944173; x=1720548973; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k9JruDziqQ/uVBz0r2MrTOIAJTHdp68r5Vdq0KyOgbw=; b=ODgU9rJv7itCQazhSTSRj7mQPCt2CNV9hTmx4y9tkEyaP4rsIMxS7DEwF+HshU9/Ky 80CRVqQ/+WnZQd+f64rLEQz7GSw4xYDTiksIucpXvJAYrAA1xUdA7j5eHPcHjQPBLsX8 o9lENvBa2PjWC0X4JF4guMmmXnCEpJfvl9vXxaqBhGEW6RMN3pmaNrxRyS4X9aGoAcv0 vpRYAY4Km3KoDBlEwQwySSjqMbpg7znjMoXENndkNhbLoRp3HbscNGUTV+pgrY4fbHXa QuiQZ1mEFU3hyuSJzmx0Kl6uBqPrMHjzWHX9iX/A7pMa1ftJDTeN/ZpJzJBinHumNJ4z I1Gg== X-Forwarded-Encrypted: i=1; AJvYcCX6qld9th/1knkGgxu2M68irv5xYKrmAUFEx/uWwCtFWseJUDOxlWEkJtMVoBCaXitnNAbPV88Oky7rLlhqNbk3WutZXU+1GbS1MIjC X-Gm-Message-State: AOJu0YwDr/x+jjzY0X/ySyXd/Lw9Z18TS0iT5JCJ8OHW+b587mJrRiQP uhx0lPNps8k9whMxzzCxyMLDO33l97ldjQfwd/53yJtaIastzvvSYjU8uZD/3ZktSNeEyq8KdkK FvGyLMLuANBAuHYJ3eA6FwO5tCWBCoy4qa1+U8lPWyTbOiYBWnGQHMPk= X-Google-Smtp-Source: AGHT+IGX+jlZSBEDqijzXr6mZS8YV5tuNfLWjoNoXFbf0+Cq9TrzfBLqMNuoVTb5vhyOWVGLDnAjzf7u0s5XuS9Cl6k= X-Received: by 2002:a05:622a:48e:b0:443:99d8:746 with SMTP id d75a77b69052e-447a395e5efmr272491cf.0.1719944172746; Tue, 02 Jul 2024 11:16:12 -0700 (PDT) MIME-Version: 1.0 References: <47AEACEE-E5CC-40E4-8611-01F3A465AF16@yandex-team.ru> <9e7b21e7-4c63-4299-87f4-780a0699a7d8@eisentraut.org> <130996.1718814994@sss.pgh.pa.us> <647660.1719003075@sss.pgh.pa.us> <3110108.1719939353@sss.pgh.pa.us> <3112460.1719940814@sss.pgh.pa.us> <3115672.1719942613@sss.pgh.pa.us> In-Reply-To: <3115672.1719942613@sss.pgh.pa.us> From: Hannu Krosing Date: Tue, 2 Jul 2024 20:15:59 +0200 Message-ID: Subject: Re: What is a typical precision of gettimeofday()? To: Tom Lane Cc: Peter Eisentraut , "Andrey M. Borodin" , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 2, 2024 at 7:50=E2=80=AFPM Tom Lane wrote: > > > Do we also need tests for this one ? > > Yeah, it was annoying me that we are eating the overhead of a TAP test > for pg_test_timing and yet it covers barely a third of the code [1]. > We obviously can't expect any specific numbers out of a test, but I > was contemplating running "pg_test_timing -d 1" and just checking for > (a) zero exit code and (b) the expected header lines in the output. At least "does it run" tests should be there - For example with the current toolchain on MacOS I was able to compile __builtin_readcyclecounter(); but it crashed when the result was executed. The same code compiled *and run* fine on same laptop with Ubuntu 24.04 We might also want to have some testing about available speedups from pg_bitmanip.h being used, but that could be tricky to test in an universal way. -- Hannu