mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 23:07:00 +02:00
few typos in comments/strings
This commit is contained in:
parent
999791d013
commit
3da4422fb5
@ -33,7 +33,7 @@ Please provide the following information:
|
|||||||
|
|
||||||
- [ ] how can I reproduce the bug?
|
- [ ] how can I reproduce the bug?
|
||||||
|
|
||||||
Incude a self-contained pgloader command file.
|
Include a self-contained pgloader command file.
|
||||||
|
|
||||||
If you're loading from a database, consider attaching a database dump to
|
If you're loading from a database, consider attaching a database dump to
|
||||||
your issue. For MySQL, use `mysqldump`. For SQLite, just send over your
|
your issue. For MySQL, use `mysqldump`. For SQLite, just send over your
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#:postmodern ; PostgreSQL protocol implementation
|
#:postmodern ; PostgreSQL protocol implementation
|
||||||
#:cl-postgres ; low level bits for COPY streaming
|
#:cl-postgres ; low level bits for COPY streaming
|
||||||
#:simple-date ; FIXME: recheck dependency
|
#:simple-date ; FIXME: recheck dependency
|
||||||
#:qmynd ; MySQL protocol implemenation
|
#:qmynd ; MySQL protocol implementation
|
||||||
#:split-sequence ; some parsing is made easy
|
#:split-sequence ; some parsing is made easy
|
||||||
#:cl-csv ; full CSV reader
|
#:cl-csv ; full CSV reader
|
||||||
#:cl-fad ; file and directories
|
#:cl-fad ; file and directories
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"Load data from SOURCE and serialize it into FILENAME, using PostgreSQL
|
"Load data from SOURCE and serialize it into FILENAME, using PostgreSQL
|
||||||
COPY TEXT format."))
|
COPY TEXT format."))
|
||||||
|
|
||||||
;; The next generic function is only to get instanciated for sources
|
;; The next generic function is only to get instantiated for sources
|
||||||
;; actually containing more than a single source item (tables, collections,
|
;; actually containing more than a single source item (tables, collections,
|
||||||
;; etc)
|
;; etc)
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
|
|
||||||
(defmethod copy-to ((copy copy) pgsql-copy-filename)
|
(defmethod copy-to ((copy copy) pgsql-copy-filename)
|
||||||
"Extract data from COPY file into a PotgreSQL COPY TEXT formated file"
|
"Extract data from COPY file into a PostgreSQL COPY TEXT formatted file"
|
||||||
(with-open-file (text-file pgsql-copy-filename
|
(with-open-file (text-file pgsql-copy-filename
|
||||||
:direction :output
|
:direction :output
|
||||||
:if-exists :supersede
|
:if-exists :supersede
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
set-table-oids
|
set-table-oids
|
||||||
including
|
including
|
||||||
excluding)
|
excluding)
|
||||||
"Copy the contents of the COPY formated file to PostgreSQL."
|
"Copy the contents of the COPY formatted file to PostgreSQL."
|
||||||
(declare (ignore data-only schema-only
|
(declare (ignore data-only schema-only
|
||||||
create-tables include-drop foreign-keys
|
create-tables include-drop foreign-keys
|
||||||
create-indexes reset-sequences materialize-views
|
create-indexes reset-sequences materialize-views
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
;; Some database sources allow the same index name being used
|
;; Some database sources allow the same index name being used
|
||||||
;; against several tables, so we add the PostgreSQL table OID in the
|
;; against several tables, so we add the PostgreSQL table OID in the
|
||||||
;; index name, to differenciate. Set the table oids now.
|
;; index name, to differentiate. Set the table OIDs now.
|
||||||
(when (and create-tables set-table-oids)
|
(when (and create-tables set-table-oids)
|
||||||
(with-stats-collection ("Set Table OIDs" :section :pre
|
(with-stats-collection ("Set Table OIDs" :section :pre
|
||||||
:use-result-as-read t
|
:use-result-as-read t
|
||||||
@ -170,7 +170,7 @@
|
|||||||
;; Foreign Key Constraints
|
;; Foreign Key Constraints
|
||||||
;;
|
;;
|
||||||
;; We need to have finished loading both the reference and the
|
;; We need to have finished loading both the reference and the
|
||||||
;; refering tables to be able to build the foreign keys, so wait
|
;; referring tables to be able to build the foreign keys, so wait
|
||||||
;; until all tables and indexes are imported before doing that.
|
;; until all tables and indexes are imported before doing that.
|
||||||
;;
|
;;
|
||||||
(when foreign-keys
|
(when foreign-keys
|
||||||
@ -512,7 +512,7 @@
|
|||||||
(lp:end-kernel :wait nil)
|
(lp:end-kernel :wait nil)
|
||||||
(return worker-count))))))
|
(return worker-count))))))
|
||||||
|
|
||||||
(log-message :info "Done with COPYing data, waiting for indexes")
|
(log-message :info "Done with COPY-ing data, waiting for indexes")
|
||||||
|
|
||||||
(when create-indexes
|
(when create-indexes
|
||||||
(let ((lp:*kernel* idx-kernel))
|
(let ((lp:*kernel* idx-kernel))
|
||||||
|
@ -236,7 +236,7 @@
|
|||||||
(mkdir-or-die root-dir debug))))
|
(mkdir-or-die root-dir debug))))
|
||||||
(setf *root-dir* (uiop:ensure-directory-pathname root-dir-truename)))
|
(setf *root-dir* (uiop:ensure-directory-pathname root-dir-truename)))
|
||||||
|
|
||||||
;; Set parameters that come from the environement
|
;; Set parameters that come from the environment
|
||||||
(init-params-from-environment)
|
(init-params-from-environment)
|
||||||
|
|
||||||
;; Read the context file (if given) and the environment
|
;; Read the context file (if given) and the environment
|
||||||
|
@ -605,7 +605,7 @@
|
|||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; The pgloader.load package implements data transfert from a pgloader
|
;;; The pgloader.load package implements data transferred from a pgloader
|
||||||
;;; source to a PostgreSQL database, using the pgloader.pgcopy COPY
|
;;; source to a PostgreSQL database, using the pgloader.pgcopy COPY
|
||||||
;;; implementation.
|
;;; implementation.
|
||||||
;;;
|
;;;
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
(defparameter *version-string*
|
(defparameter *version-string*
|
||||||
(concatenate 'string *major-version* "."
|
(concatenate 'string *major-version* "."
|
||||||
(if *release* *minor-version* (git-hash)))
|
(if *release* *minor-version* (git-hash)))
|
||||||
"pgloader version strings, following Emacs versionning model.")
|
"pgloader version strings, following Emacs versioning model.")
|
||||||
|
|
||||||
(defvar *self-upgrade-immutable-systems* nil
|
(defvar *self-upgrade-immutable-systems* nil
|
||||||
"Used for --self-upgrade.")
|
"Used for --self-upgrade.")
|
||||||
@ -175,7 +175,7 @@
|
|||||||
;;; Run time context to fill-in variable parts of the commands.
|
;;; Run time context to fill-in variable parts of the commands.
|
||||||
;;;
|
;;;
|
||||||
(defvar *context* nil
|
(defvar *context* nil
|
||||||
"Alist of (names . values) intialized from the environment at run-time,
|
"Alist of (names . values) initialized from the environment at run-time,
|
||||||
and from a --context command line argument, then used in the commands when
|
and from a --context command line argument, then used in the commands when
|
||||||
they are using the Mustache templating feature.")
|
they are using the Mustache templating feature.")
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@
|
|||||||
(assert (eq m-type :regex))
|
(assert (eq m-type :regex))
|
||||||
(assert (eq d-type :filename))
|
(assert (eq d-type :filename))
|
||||||
(unless root
|
(unless root
|
||||||
(error "Directory ~s does not exists."
|
(error "Directory ~s does not exist."
|
||||||
(uiop:native-namestring dir)))
|
(uiop:native-namestring dir)))
|
||||||
`(:regex ,first-or-all ,regex ,root))))
|
`(:regex ,first-or-all ,regex ,root))))
|
||||||
|
|
||||||
|
@ -30,9 +30,9 @@
|
|||||||
|
|
||||||
(defun db-write-row (copier data)
|
(defun db-write-row (copier data)
|
||||||
"Copy cl-postgres:db-write-row guts to avoid computing utf-8 bytes all
|
"Copy cl-postgres:db-write-row guts to avoid computing utf-8 bytes all
|
||||||
over again, as we reproduced the data formating in pgloader code. The
|
over again, as we reproduced the data formatting in pgloader code. The
|
||||||
reason we do that is to be able to lower the cost of retrying batches:
|
reason we do that is to be able to lower the cost of retrying batches:
|
||||||
the formating has then already been done."
|
the formatting has then already been done."
|
||||||
(let* ((connection (cl-postgres::copier-database copier))
|
(let* ((connection (cl-postgres::copier-database copier))
|
||||||
(cl-postgres::socket (cl-postgres::connection-socket connection)))
|
(cl-postgres::socket (cl-postgres::connection-socket connection)))
|
||||||
(cl-postgres::with-reconnect-restart connection
|
(cl-postgres::with-reconnect-restart connection
|
||||||
@ -52,9 +52,9 @@
|
|||||||
;;;
|
;;;
|
||||||
(defun db-write-vector-row (copier row &optional (nbcols (length row)))
|
(defun db-write-vector-row (copier row &optional (nbcols (length row)))
|
||||||
"Copy cl-postgres:db-write-row guts to avoid computing utf-8 bytes all
|
"Copy cl-postgres:db-write-row guts to avoid computing utf-8 bytes all
|
||||||
over again, as we reproduced the data formating in pgloader code. The
|
over again, as we reproduced the data formatting in pgloader code. The
|
||||||
reason we do that is to be able to lower the cost of retrying batches:
|
reason we do that is to be able to lower the cost of retrying batches:
|
||||||
the formating has then already been done."
|
the formatting has then already been done."
|
||||||
(declare (optimize (speed 3) (space 0) (debug 1) (compilation-speed 0)))
|
(declare (optimize (speed 3) (space 0) (debug 1) (compilation-speed 0)))
|
||||||
(let* ((col-bytes (map 'vector
|
(let* ((col-bytes (map 'vector
|
||||||
(lambda (col)
|
(lambda (col)
|
||||||
@ -89,9 +89,9 @@
|
|||||||
|
|
||||||
(defun db-write-escaped-vector-row (copier row &optional (nbcols (length row)))
|
(defun db-write-escaped-vector-row (copier row &optional (nbcols (length row)))
|
||||||
"Copy cl-postgres:db-write-row guts to avoid computing utf-8 bytes all
|
"Copy cl-postgres:db-write-row guts to avoid computing utf-8 bytes all
|
||||||
over again, as we reproduced the data formating in pgloader code. The
|
over again, as we reproduced the data formatting in pgloader code. The
|
||||||
reason we do that is to be able to lower the cost of retrying batches:
|
reason we do that is to be able to lower the cost of retrying batches:
|
||||||
the formating has then already been done."
|
the formatting has then already been done."
|
||||||
(declare (optimize (speed 3) (space 0) (debug 1) (compilation-speed 0)))
|
(declare (optimize (speed 3) (space 0) (debug 1) (compilation-speed 0)))
|
||||||
(let* ((col-bytes (map 'vector
|
(let* ((col-bytes (map 'vector
|
||||||
(lambda (col)
|
(lambda (col)
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
(defun prepare-and-format-row-for-s3 (copy nbcols row)
|
(defun prepare-and-format-row-for-s3 (copy nbcols row)
|
||||||
"Redshift doesn't know how to parse COPY format, we need to upload CSV
|
"Redshift doesn't know how to parse COPY format, we need to upload CSV
|
||||||
instead. That said, we don't have to be as careful with the data layout
|
instead. That said, we don't have to be as careful with the data layout
|
||||||
and unicode representation when COPYing from a CSV file as we do when
|
and unicode representation when COPY-ing from a CSV file as we do when
|
||||||
implementing the data streaming outselves."
|
implementing the data streaming outselves."
|
||||||
(declare (ignore copy nbcols))
|
(declare (ignore copy nbcols))
|
||||||
(let ((pg-vector-row (cl-csv:write-csv-row (coerce row 'list)
|
(let ((pg-vector-row (cl-csv:write-csv-row (coerce row 'list)
|
||||||
|
@ -477,7 +477,7 @@ $$; " tables)))
|
|||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Citus Disitribution support
|
;;; Citus Distribution support
|
||||||
;;;
|
;;;
|
||||||
(defun create-distributed-table (distribute-rules)
|
(defun create-distributed-table (distribute-rules)
|
||||||
(let ((citus-sql
|
(let ((citus-sql
|
||||||
|
@ -168,7 +168,7 @@
|
|||||||
*redshift-decimal-max-precision* scale)))))
|
*redshift-decimal-max-precision* scale)))))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Target data type is suppported, just keep it around.
|
;; Target data type is supported, just keep it around.
|
||||||
;;
|
;;
|
||||||
((and (stringp (column-type-name column))
|
((and (stringp (column-type-name column))
|
||||||
(member (column-type-name column)
|
(member (column-type-name column)
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
;;
|
;;
|
||||||
;; The connection facility still works with cons here,
|
;; The connection facility still works with cons here,
|
||||||
;; rather than table structure instances, because of
|
;; rather than table structure instances, because of
|
||||||
;; depedencies as explained in
|
;; dependencies as explained in
|
||||||
;; src/parsers/command-db-uri.lisp
|
;; src/parsers/command-db-uri.lisp
|
||||||
;;
|
;;
|
||||||
(cons "expected" (table-name target-table)))
|
(cons "expected" (table-name target-table)))
|
||||||
|
@ -133,7 +133,7 @@
|
|||||||
;;; The methods for those function query the source database catalogs and
|
;;; The methods for those function query the source database catalogs and
|
||||||
;;; populate pgloader's internal representation of its catalog.
|
;;; populate pgloader's internal representation of its catalog.
|
||||||
;;;
|
;;;
|
||||||
;;; On some source systems (such as MySQL) a single schema can be adressed
|
;;; On some source systems (such as MySQL) a single schema can be addressed
|
||||||
;;; at a time, and the catalog object might be a schema directly.
|
;;; at a time, and the catalog object might be a schema directly.
|
||||||
;;;
|
;;;
|
||||||
(defgeneric filter-list-to-where-clause (db-copy filter-list
|
(defgeneric filter-list-to-where-clause (db-copy filter-list
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
(string-equal table-name (car rule-source-column))
|
(string-equal table-name (car rule-source-column))
|
||||||
(string-equal column-name (cdr rule-source-column)))
|
(string-equal column-name (cdr rule-source-column)))
|
||||||
|
|
||||||
;; otherwide, we do the full dance
|
;; otherwise, we do the full dance
|
||||||
(and
|
(and
|
||||||
(or (and t-s-p (string-equal type rule-source-type)))
|
(or (and t-s-p (string-equal type rule-source-type)))
|
||||||
(or (null tm-s-p) (when typemod
|
(or (null tm-s-p) (when typemod
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
;;; Materialized Views support is quite similar from a DB engine from another.
|
;;; Materialized Views support is quite similar from a DB engine from another.
|
||||||
;;;
|
;;;
|
||||||
;; It happens that the view definition is given by the user, so pgloader is
|
;; It happens that the view definition is given by the user, so pgloader is
|
||||||
;; not concerned with that part of the SQL compatiblity. The common
|
;; not concerned with that part of the SQL compatibility. The common
|
||||||
;; implementation uses the following two SQL comamnds:
|
;; implementation uses the following two SQL commands:
|
||||||
;;;
|
;;;
|
||||||
;;; CREATE VIEW <schema>.<name> AS <sql>
|
;;; CREATE VIEW <schema>.<name> AS <sql>
|
||||||
;;; DROP VIEW <schema>.<name>, <schema>.<name>, ...;
|
;;; DROP VIEW <schema>.<name>, <schema>.<name>, ...;
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
(defun reformat-then-process (&key fields columns target)
|
(defun reformat-then-process (&key fields columns target)
|
||||||
"Return a lambda form to apply to each row we read.
|
"Return a lambda form to apply to each row we read.
|
||||||
|
|
||||||
The lambda closes over the READ paramater, which is a counter of how many
|
The lambda closes over the READ parameter, which is a counter of how many
|
||||||
lines we did read in the file."
|
lines we did read in the file."
|
||||||
(let ((projection (project-fields :fields fields :columns columns)))
|
(let ((projection (project-fields :fields fields :columns columns)))
|
||||||
(lambda (row)
|
(lambda (row)
|
||||||
|
@ -217,7 +217,7 @@ Illegal ~a character starting at position ~a~@[: ~a~].~%"
|
|||||||
"Special per-table encoding/decoding overloading rules for MySQL.")
|
"Special per-table encoding/decoding overloading rules for MySQL.")
|
||||||
|
|
||||||
(defun apply-decoding-as-filters (table-name filters)
|
(defun apply-decoding-as-filters (table-name filters)
|
||||||
"Return a generialized boolean which is non-nil only if TABLE-NAME matches
|
"Return a generalized boolean which is non-nil only if TABLE-NAME matches
|
||||||
one of the FILTERS."
|
one of the FILTERS."
|
||||||
(flet ((apply-filter (filter) (matches filter table-name)))
|
(flet ((apply-filter (filter) (matches filter table-name)))
|
||||||
(some #'apply-filter filters)))
|
(some #'apply-filter filters)))
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
(:source (:type "character varying")
|
(:source (:type "character varying")
|
||||||
:target (:type "text" :drop-typemod t)))
|
:target (:type "text" :drop-typemod t)))
|
||||||
"Data Type Casting to migrate from PostgtreSQL to PostgreSQL")
|
"Data Type Casting to migrate from PostgreSQL to PostgreSQL")
|
||||||
|
|
||||||
(defmethod pgsql-column-ctype ((column column))
|
(defmethod pgsql-column-ctype ((column column))
|
||||||
"Build the ctype definition from the PostgreSQL column information."
|
"Build the ctype definition from the PostgreSQL column information."
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
(uiop:run-program command)))
|
(uiop:run-program command)))
|
||||||
|
|
||||||
(defun gunzip (archive-file expand-directory)
|
(defun gunzip (archive-file expand-directory)
|
||||||
"Unzip a gzip formated archive"
|
"Unzip a gzip formatted archive"
|
||||||
(let ((command (format nil "gunzip -c ~s > ~s"
|
(let ((command (format nil "gunzip -c ~s > ~s"
|
||||||
(uiop:native-namestring archive-file)
|
(uiop:native-namestring archive-file)
|
||||||
(uiop:native-namestring (pathname-name archive-file))))
|
(uiop:native-namestring (pathname-name archive-file))))
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; When migrating from another database to PostgreSQL some data types might
|
;;; When migrating from another database to PostgreSQL some data types might
|
||||||
;;; need to be tranformed dynamically into User Defined Types: ENUMs, SET,
|
;;; need to be transformed dynamically into User Defined Types: ENUMs, SET,
|
||||||
;;; etc.
|
;;; etc.
|
||||||
;;;
|
;;;
|
||||||
(defstruct sqltype name schema type source-def extra extension)
|
(defstruct sqltype name schema type source-def extra extension)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
(:documentation "Check that we can actually connect."))
|
(:documentation "Check that we can actually connect."))
|
||||||
|
|
||||||
(defgeneric clone-connection (connection)
|
(defgeneric clone-connection (connection)
|
||||||
(:documentation "Instanciate a new connection object with similar properties."))
|
(:documentation "Instantiate a new connection object with similar properties."))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
@ -293,7 +293,7 @@
|
|||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Have yason output JSON formated output, straight from our instances.
|
;;; Have yason output JSON formatted output, straight from our instances.
|
||||||
;;;
|
;;;
|
||||||
(defmacro define-yason-encoder (class)
|
(defmacro define-yason-encoder (class)
|
||||||
"Define a new yason:encode method for CLASS."
|
"Define a new yason:encode method for CLASS."
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
(format nil "~c~a~c" quote-char value quote-char)))
|
(format nil "~c~a~c" quote-char value quote-char)))
|
||||||
|
|
||||||
(defun build-identifier (sep &rest parts)
|
(defun build-identifier (sep &rest parts)
|
||||||
"Concatenante PARTS into a PostgreSQL identifier, with SEP in between
|
"Concatenate PARTS into a PostgreSQL identifier, with SEP in between
|
||||||
parts. That's useful for creating an index name from a table's oid and name."
|
parts. That's useful for creating an index name from a table's oid and name."
|
||||||
(apply-identifier-case
|
(apply-identifier-case
|
||||||
(apply #'concatenate
|
(apply #'concatenate
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
(setf (parser-state p) (if (null (parser-tags p)) :eat :eqt)))
|
(setf (parser-state p) (if (null (parser-tags p)) :eat :eqt)))
|
||||||
|
|
||||||
#|
|
#|
|
||||||
Here's a test case straigth from the PostgreSQL docs:
|
Here's a test case straight from the PostgreSQL docs:
|
||||||
|
|
||||||
(with-input-from-string (s "
|
(with-input-from-string (s "
|
||||||
create function f(text)
|
create function f(text)
|
||||||
@ -101,7 +101,7 @@ Another test case for the classic quotes:
|
|||||||
- EQT Eat Quoted Text
|
- EQT Eat Quoted Text
|
||||||
- EDQ Eat Double-Quoted Text (identifiers)
|
- EDQ Eat Double-Quoted Text (identifiers)
|
||||||
- EOQ done reading the query
|
- EOQ done reading the query
|
||||||
- ESC read espaced text (with backslash)"
|
- ESC read escaped text (with backslash)"
|
||||||
(handler-case
|
(handler-case
|
||||||
(loop
|
(loop
|
||||||
:until (eq :eoq (parser-state state))
|
:until (eq :eoq (parser-state state))
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
(in-package :pgloader.state)
|
(in-package :pgloader.state)
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Timing Formating
|
;;; Timing Formatting
|
||||||
;;;
|
;;;
|
||||||
(defun format-interval (seconds &optional (stream t))
|
(defun format-interval (seconds &optional (stream t))
|
||||||
"Output the number of seconds in a human friendly way"
|
"Output the number of seconds in a human friendly way"
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
(gethash name (pgstate-tables pgstate)))
|
(gethash name (pgstate-tables pgstate)))
|
||||||
|
|
||||||
(defun pgstate-new-label (pgstate label)
|
(defun pgstate-new-label (pgstate label)
|
||||||
"Instanciate a new pgtable structure to hold our stats, and return it."
|
"Instantiate a new pgtable structure to hold our stats, and return it."
|
||||||
(or (pgstate-get-label pgstate label)
|
(or (pgstate-get-label pgstate label)
|
||||||
(let* ((pgtable (setf (gethash label (pgstate-tables pgstate))
|
(let* ((pgtable (setf (gethash label (pgstate-tables pgstate))
|
||||||
(make-pgtable :name label
|
(make-pgtable :name label
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
;;; For log messages
|
;;; For log messages
|
||||||
;;;
|
;;;
|
||||||
(defun pretty-print-bytes (bytes &key (unit "B"))
|
(defun pretty-print-bytes (bytes &key (unit "B"))
|
||||||
"Return a string to reprensent bytes in human readable format, with units"
|
"Return a string to represent bytes in human readable format, with units"
|
||||||
(let ((bytes (or bytes 0)))
|
(let ((bytes (or bytes 0)))
|
||||||
(loop
|
(loop
|
||||||
:for multiple :in '("T" "G" "M" "k")
|
:for multiple :in '("T" "G" "M" "k")
|
||||||
|
Loading…
Reference in New Issue
Block a user