The R Project SVN R

Rev

Rev 72071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72071 Rev 72625
Line 1... Line 1...
1
#  File src/library/tools/R/Rprof.R
1
#  File src/library/tools/R/Rprof.R
2
#  Part of the R package, https://www.R-project.org
2
#  Part of the R package, https://www.R-project.org
3
#
3
#
4
#  Copyright (C) 1995-2014 The R Core Team
4
#  Copyright (C) 1995-2017 The R Core Team
5
#
5
#
6
#  This program is free software; you can redistribute it and/or modify
6
#  This program is free software; you can redistribute it and/or modify
7
#  it under the terms of the GNU General Public License as published by
7
#  it under the terms of the GNU General Public License as published by
8
#  the Free Software Foundation; either version 2 of the License, or
8
#  the Free Software Foundation; either version 2 of the License, or
9
#  (at your option) any later version.
9
#  (at your option) any later version.
Line 14... Line 14...
14
#  GNU General Public License for more details.
14
#  GNU General Public License for more details.
15
#
15
#
16
#  A copy of the GNU General Public License is available at
16
#  A copy of the GNU General Public License is available at
17
#  https://www.R-project.org/Licenses/
17
#  https://www.R-project.org/Licenses/
18
 
18
 
19
.Rprof <- function(args = NULL)
19
.Rprof <- function(args = NULL, no.q = FALSE)
20
{
20
{
-
 
21
    do_exit <-
-
 
22
	if(no.q)
-
 
23
	    function(status) (if(status) stop else message)(
-
 
24
		".Rprof() exit status ", status)
-
 
25
	else
21
    do_exit <- function(status = 1L) q("no", status = status, runLast = FALSE)
26
	    function(status) q("no", status = status, runLast = FALSE)
22
 
27
 
23
    Usage <- function() {
28
    Usage <- function() {
24
        cat("Usage: R CMD Rprof [options] [file]",
29
        cat("Usage: R CMD Rprof [options] [file]",
25
            "",
30
            "",
26
            "Post-process profiling information in file generated by Rprof().",
31
            "Post-process profiling information in file generated by Rprof().",