Benchmarking the CodelistGenerator R package

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
CDMConnector::requireEunomia("synpuf-1k", "5.3")

To check the performance of the CodelistGenerator package, we can use the benchmarkCodelistGenerator(). This function generates some hypothetical study codelists using various settings and times to check how long these analyses take.

We can start for example by benchmarking our mock data, which uses duckdb.

library(DBI)
library(duckdb)
library(dplyr)
library(CDMConnector)
library(CodelistGenerator)
library(visOmopResults)

# Connect to the database and create the cdm object
con <- dbConnect(duckdb(), 
                      eunomiaDir("synpuf-1k", "5.3"))
cdm <- cdmFromCon(con = con, 
                  cdmName = "Eunomia Synpuf",
                  cdmSchema   = "main",
                  writeSchema = "main", 
                  achillesSchema = "main")

timings <- benchmarkCodelistGenerator(cdm)

visOmopTable(timings,
             hide = c("variable_name", "variable_level", "strata_name", "strata_level"),
             groupColumn = "task")


Try the CodelistGenerator package in your browser

Any scripts or data that you put into this service are public.

CodelistGenerator documentation built on Dec. 17, 2025, 5:06 p.m.