File: profile.rkt

package info (click to toggle)
racket-mode 20181003git0-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 732 kB
  • sloc: lisp: 7,641; makefile: 56
file content (19 lines) | stat: -rw-r--r-- 648 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#lang racket/base

(require racket/match
         (only-in "../instrument.rkt" get-profile-info))

(provide get-profile)

(define (get-profile)
  ;; TODO: Filter files from racket-mode itself, b/c just noise?
  (for/list ([x (in-list (get-profile-info))])
    (match-define (list count msec name stx _ ...) x)
    (list count
          msec
          (and name (symbol->string name))
          (and (syntax-source stx) (path? (syntax-source stx))
               (path->string (syntax-source stx)))
          (syntax-position stx)
          (and (syntax-position stx) (syntax-span stx)
               (+ (syntax-position stx) (syntax-span stx))))))