From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 196EC7F0BD for ; Wed, 1 Feb 2017 10:05:30 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=alain.frisch@lexifi.com; spf=None smtp.mailfrom=alain.frisch@lexifi.com; spf=None smtp.helo=postmaster@vrout10.yaziba.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain.frisch@lexifi.com) identity=pra; client-ip=185.56.204.32; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="alain.frisch@lexifi.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain.frisch@lexifi.com) identity=mailfrom; client-ip=185.56.204.32; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="alain.frisch@lexifi.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@vrout10.yaziba.net) identity=helo; client-ip=185.56.204.32; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain.frisch@lexifi.com"; x-sender="postmaster@vrout10.yaziba.net"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A6LGlAxeIYyzddHx2O5WudAf1lGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxc67YB7h7PlgxGXEQZ/co6odzbGH7+a+BydZu8nJ8ChbNscTB1ld0Y?= =?us-ascii?q?RetjdjKfDGIHWzFOTtYS0+EZYKf35e1Fb/D3JoHt3jbUbZuHy44G1aMBz+MQ1o?= =?us-ascii?q?Ora9QdaK3Izkn9y1rqDWagRSzAG8bb9zNQi75VHMs8AXm81iNKkZxR7Ao38OcO?= =?us-ascii?q?NTkycgLluWm1P459ys1J9l6SVZ/fw7pOBaVqCvVqAxTLoQIi4nKGs1rJnisRDC?= =?us-ascii?q?S02B/HoHWWU+lhdYAgbEqhr9W8Gi4WPBquNh1XzCboXNRrcuVGH64g=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0D9AwCLpJFYfSDMOLldGwEBBAEBCgEBF?= =?us-ascii?q?wEBBAEBCgEBhAoqhDabcR8QlzImhXwCgkJDFAEBAQEBAQEBAQEBEgEBCxQKTII?= =?us-ascii?q?zGYIeAQUjFVELGAICJgICVwYBDAgBAYlyAQmsMIIlizMBCwEgBYELhUCCBQiBW?= =?us-ascii?q?YEJh1OCXwEEm1uBfYRqixyBYYhXhkOLAod9AjaBPBMdUIRAH4FiiREBAQE?= X-IPAS-Result: =?us-ascii?q?A0D9AwCLpJFYfSDMOLldGwEBBAEBCgEBFwEBBAEBCgEBhAo?= =?us-ascii?q?qhDabcR8QlzImhXwCgkJDFAEBAQEBAQEBAQEBEgEBCxQKTIIzGYIeAQUjFVELG?= =?us-ascii?q?AICJgICVwYBDAgBAYlyAQmsMIIlizMBCwEgBYELhUCCBQiBWYEJh1OCXwEEm1u?= =?us-ascii?q?BfYRqixyBYYhXhkOLAod9AjaBPBMdUIRAH4FiiREBAQE?= X-IronPort-AV: E=Sophos;i="5.33,319,1477954800"; d="scan'208";a="258347330" Received: from vrout10.yaziba.net ([185.56.204.32]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Feb 2017 10:04:54 +0100 Received: from mtaout10.int.yaziba.net (mtaout10.int.yaziba.net [10.4.20.36]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout10.yaziba.net (mx10.yaziba.net) with ESMTPS id 2F340522BD; Wed, 1 Feb 2017 10:04:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mtaout10.int.yaziba.net (Postfix) with ESMTP id 3978A160214; Wed, 1 Feb 2017 10:04:54 +0100 (CET) X-Virus-Scanned: amavisd-new at Received: from mtaout10.int.yaziba.net ([127.0.0.1]) by localhost (mtaout10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VWJuUdRTFt1G; Wed, 1 Feb 2017 10:04:54 +0100 (CET) Received: from [10.0.210.125] (unknown [185.23.92.144]) by mtaout10.int.yaziba.net (Postfix) with ESMTPSA id 237B71600D1; Wed, 1 Feb 2017 10:04:54 +0100 (CET) To: Umair Siddique , caml-list@inria.fr References: From: Alain Frisch Message-ID: Date: Wed, 1 Feb 2017 10:04:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-DRWEB-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrfeelgedrieeigddufeegucetufdoteggodetrfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptehlrghinhcuhfhrihhstghhuceorghlrghinhdrfhhrihhstghhsehlvgigihhfihdrtghomheqnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepudekhedrvdefrdelvddrudeggeenucfrrghrrghmpehmohguvgepshhmthhpohhuth X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] Memory Usage If you are only interested in measuring how much a given function allocates, you can simply call Gc.allocated_bytes before and after. Otherwise, and in addition to other great suggestions, let me add this one: https://github.com/LexiFi/landmarks -- Alain On 30/01/2017 17:39, Umair Siddique wrote: > Dear All, > > > I am wondering what is the best way to find the time and memory usage > (in words or bytes) of an Ocaml function, e.g., Factorial) on MAC? > > > Thanks > > > Umair