]> gitweb.factorcode.org Git - factor.git/commitdiff
ci.run-process: rename to process-autopsy
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 25 Jan 2023 19:18:37 +0000 (11:18 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 25 Jan 2023 23:19:41 +0000 (15:19 -0800)
extra/ci/run-process/authors.txt [deleted file]
extra/ci/run-process/platforms.txt [deleted file]
extra/ci/run-process/run-process.factor [deleted file]
extra/process-autopsy/authors.txt [new file with mode: 0644]
extra/process-autopsy/platforms.txt [new file with mode: 0644]
extra/process-autopsy/process-autopsy.factor [new file with mode: 0644]

diff --git a/extra/ci/run-process/authors.txt b/extra/ci/run-process/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/extra/ci/run-process/platforms.txt b/extra/ci/run-process/platforms.txt
deleted file mode 100644 (file)
index 509143d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-unix
diff --git a/extra/ci/run-process/run-process.factor b/extra/ci/run-process/run-process.factor
deleted file mode 100644 (file)
index a3e1c12..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-! Copyright (C) 2018 Doug Coleman.
-! See https://factorcode.org/license.txt for BSD license.
-USING: accessors assocs calendar combinators environment
-escape-strings io io.pathnames io.streams.string kernel math
-math.parser namespaces prettyprint prettyprint.config sequences
-tools.deploy.backend tools.time unix.groups unix.users uuid ;
-IN: ci.run-process
-
-TUPLE: process-autopsy
-    timestamp os-envs
-    cwd uid euid gid egid out elapsed os-envs-after process ;
-
-: ci-run-process ( process -- timestamp os-envs cwd uid euid gid egid out elapsed os-envs' process )
-    [
-        [
-            now-gmt os-envs current-directory get
-            real-user-id effective-user-id
-            real-group-id effective-group-id
-        ] dip [
-            '[ _ run-with-output ] with-string-writer
-        ] benchmark os-envs
-    ] keep ;
-
-: ci-run-process>autopsy ( process -- autopsy )
-    ci-run-process process-autopsy boa ;
-
-: unparse-full ( obj -- str )
-    [ unparse ] without-limits ;
-
-: autopsy. ( autopsy -- )
-    {
-        [ drop "<AUTOPSY: " uuid4 append print nl ]
-        [
-            bl bl timestamp>> timestamp>unix-time >float number>string
-            "unix-time" tag-payload print nl
-        ]
-        [
-            bl bl elapsed>> number>string "elapsed-nanos" tag-payload print nl
-        ]
-        [
-            bl bl cwd>> "cwd" tag-payload print nl
-        ]
-        [
-            bl bl uid>> number>string "uid" tag-payload print nl
-        ]
-        [
-            bl bl euid>> number>string "euid" tag-payload print nl
-        ]
-        [
-            bl bl gid>> number>string "gid" tag-payload print nl
-        ]
-        [
-            bl bl egid>> number>string "egid" tag-payload print nl
-        ]
-        [
-            bl bl os-envs>> unparse-full "os-envs" tag-payload print nl
-        ]
-        [
-            bl bl os-envs>> unparse-full "os-envs-after" tag-payload print nl
-        ]
-        [
-            bl bl [ os-envs-after>> ] [ os-envs>> ] bi assoc-diff unparse-full "os-envs-diff" tag-payload print nl
-        ]
-        [
-            bl bl [ os-envs>> ] [ os-envs-after>> ] bi assoc-diff unparse-full "os-envs-swap-diff" tag-payload print nl
-        ]
-        [
-            bl bl process>> unparse-full "process" tag-payload print nl
-        ]
-        [
-            bl bl out>> "out" tag-payload print nl
-        ]
-        [ drop ";AUTOPSY>" print ]
-    } cleave ;
diff --git a/extra/process-autopsy/authors.txt b/extra/process-autopsy/authors.txt
new file mode 100644 (file)
index 0000000..7c1b2f2
--- /dev/null
@@ -0,0 +1 @@
+Doug Coleman
diff --git a/extra/process-autopsy/platforms.txt b/extra/process-autopsy/platforms.txt
new file mode 100644 (file)
index 0000000..509143d
--- /dev/null
@@ -0,0 +1 @@
+unix
diff --git a/extra/process-autopsy/process-autopsy.factor b/extra/process-autopsy/process-autopsy.factor
new file mode 100644 (file)
index 0000000..75eb5af
--- /dev/null
@@ -0,0 +1,74 @@
+! Copyright (C) 2018 Doug Coleman.
+! See https://factorcode.org/license.txt for BSD license.
+USING: accessors assocs calendar combinators environment
+escape-strings io io.pathnames io.streams.string kernel math
+math.parser namespaces prettyprint prettyprint.config sequences
+tools.deploy.backend tools.time unix.groups unix.users uuid ;
+IN: process-autopsy
+
+TUPLE: process-autopsy
+    timestamp os-envs
+    cwd uid euid gid egid out elapsed os-envs-after process ;
+
+: ci-run-process ( process -- timestamp os-envs cwd uid euid gid egid out elapsed os-envs' process )
+    [
+        [
+            now-gmt os-envs current-directory get
+            real-user-id effective-user-id
+            real-group-id effective-group-id
+        ] dip [
+            '[ _ run-with-output ] with-string-writer
+        ] benchmark os-envs
+    ] keep ;
+
+: ci-run-process>autopsy ( process -- autopsy )
+    ci-run-process process-autopsy boa ;
+
+: unparse-full ( obj -- str )
+    [ unparse ] without-limits ;
+
+: autopsy. ( autopsy -- )
+    {
+        [ drop "<AUTOPSY: " uuid4 append print nl ]
+        [
+            bl bl timestamp>> timestamp>unix-time >float number>string
+            "unix-time" tag-payload print nl
+        ]
+        [
+            bl bl elapsed>> number>string "elapsed-nanos" tag-payload print nl
+        ]
+        [
+            bl bl cwd>> "cwd" tag-payload print nl
+        ]
+        [
+            bl bl uid>> number>string "uid" tag-payload print nl
+        ]
+        [
+            bl bl euid>> number>string "euid" tag-payload print nl
+        ]
+        [
+            bl bl gid>> number>string "gid" tag-payload print nl
+        ]
+        [
+            bl bl egid>> number>string "egid" tag-payload print nl
+        ]
+        [
+            bl bl os-envs>> unparse-full "os-envs" tag-payload print nl
+        ]
+        [
+            bl bl os-envs>> unparse-full "os-envs-after" tag-payload print nl
+        ]
+        [
+            bl bl [ os-envs-after>> ] [ os-envs>> ] bi assoc-diff unparse-full "os-envs-diff" tag-payload print nl
+        ]
+        [
+            bl bl [ os-envs>> ] [ os-envs-after>> ] bi assoc-diff unparse-full "os-envs-swap-diff" tag-payload print nl
+        ]
+        [
+            bl bl process>> unparse-full "process" tag-payload print nl
+        ]
+        [
+            bl bl out>> "out" tag-payload print nl
+        ]
+        [ drop ";AUTOPSY>" print ]
+    } cleave ;