#!/usr/bin/env slsh require ("profile"); require ("cmdopt"); private variable Version = "0.2.2-0"; private variable Profile_Fp; private define _slprof_version () { () = fprintf (stderr, "slprof version %s; S-Lang version: %s\n", Version, _slang_version_string); } private define _slprof_usage () { variable fp = stderr; () = fprintf (fp, "Usage: %s [options] script args...\n", path_basename (__argv[0])); () = fprintf (fp, "Options:\n"); variable opts = [ " -c|--calibrate Calibrate using N repetitions [default:1000, 0=off]\n", " -f|--func Name of Function to call [default: slsh_main]\n", " -l|--lines Profile lines, not just functions\n", " -o|--output Name of output file [default: