Skip to content
Snippets Groups Projects
Commit 27d01e2d authored by Florian Angerer's avatar Florian Angerer
Browse files

Initial commit for 'refcmp' package.

parent 1d51efb4
Branches
No related tags found
No related merge requests found
Package: refcmp
Type: Package
Title: Compare snapshotted variables to a reference run
Version: 1.0
Date: 2017-09-07
Author: Florian Angerer
Maintainer: Florian Angerer <florian.angerer@oracle.com>
Copyright: Oracle
Description: Compare values at defined snapshot to a reference run.
License: GPL-2
Depends:
RoxygenNote: 6.0.1
# Generated by roxygen2: do not edit by hand
export(snapshot)
export(snapshot.init)
##
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
##
refcmpEnv <- new.env(parent = emptyenv())
refcmpEnv$reference_filename <- 'reference_values.obj'
refcmpEnv$snapshot_id <- 0L
snapshot.isFastR <- function() {
length(grep('FastR', R.Version()$version.string)) != 0
}
refcmpEnv$isReferenceRun <- function() !snapshot.isFastR()
snaphost.init <- function(filename) {
if(!missing(filename)) {
refcmpEnv$reference_filename <- filename
} else {
}
}
snaphost.has_reference_run <- function(...) {
}
snapshot <- function(...) {
vars <- list(...)
if(recmpEnv$isReferenceRun()) {
snapshot.record(vars)
} else {
snapshot.check(vars)
}
}
snapshot.record <- function(vars) {
fcon <- file(refcmpEnv$reference_filename
}
snapshot.check <- function(vars) {
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment