[noctool-cvs] CVS source

imattsson imattsson at common-lisp.net
Sun Jun 22 11:02:21 UTC 2008


Update of /project/noctool/cvsroot/source
In directory clnet:/tmp/cvs-serv21204

Modified Files:
	graph-monitors.lisp 
Log Message:
IM

Added a GRAPH-IGNORE "make ignored vars" style-warnings go away.


--- /project/noctool/cvsroot/source/graph-monitors.lisp	2008/06/20 12:19:57	1.5
+++ /project/noctool/cvsroot/source/graph-monitors.lisp	2008/06/22 11:02:21	1.6
@@ -7,6 +7,10 @@
 		       (-12 . "p") (12 . "T")))
 (defvar *days* #("Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"))
 
+(defun graph-ignore (&rest args)
+  (declare (ignore args))
+  nil)
+
 (defun nearest-multiplier (n)
   (let ((pow (log n 10)))
     (multiple-value-bind (floor mod)
@@ -76,33 +80,48 @@
     (image:rect image 0 0 349 139 t 240 240 240)
     (multiple-value-bind (percentile max scale)
 	(show (noctool::graph graph) image nil :selector selector :scale scale)
+      (graph-ignore percentile max scale)
       )))
 
 (defmethod show ((graph noctool::disk-container) sink format &key (selector :short) scale &allow-other-keys)
+  (graph-ignore scale)
   (let ((lines (length (noctool::disk-list graph)))
 	(disks (sort (copy-list (noctool::disk-list graph)) #'> :key #'noctool::disk-max)))
     (let ((image (image:make-image 350 (+ 130 (* 10 lines)))))
       (image:rect image 0 0 349 (1- (image::height image)) t 192 192 192)
-      (multiple-value-bind (percentile max scale) (show (noctool::disk-graph (car disks)) image nil :color '(0 0 0 0.0) :base-x 25 :base-y 110 :height 100 :selector selector)
+      (multiple-value-bind (percentile max scale)
+	  (show (noctool::disk-graph (car disks)) image nil
+		:color '(0 0 0 0.0)
+		:base-x 25 :base-y 110 :height 100 :selector selector)
+	(graph-ignore percentile)
 	(draw-grid image max (interval graph) selector scale "b" 3 (noctool:last-updated graph))
 	(loop for disk in disks
 	      for color in *graph-colors*
 	      for text-offset = 125 then (+ text-offset 10)
 	      for style = :line then :plot
 	      do (let ((graph (noctool::disk-graph disk))
-		       (text (format nil "~a [ ~a ]" (noctool::mountpoint disk) (noctool::device disk))))
-		   (show graph image nil :color color :scale scale :height 100 :base-y 110 :base-x 25 :selector selector :style style)
+		       (text (format nil "~a [ ~a ]"
+				     (noctool::mountpoint disk)
+				     (noctool::device disk))))
+		   (show graph image nil :color color :scale scale
+			 :height 100 :base-y 110 :base-x 25
+			 :selector selector :style style)
 		   (image:text image text 25 text-offset 0 0 0)
 		   (image:rect image 15 text-offset 20 (+ 5 text-offset)
 			 t (nth 0 color) (nth 1 color)(nth 2 color)))))
       image)))
 
 (defmethod show ((graph noctool::disk-container) sink format &key (selector :short) scale &allow-other-keys)
+  (graph-ignore scale)
   (let ((lines (length (noctool::disk-list graph)))
 	(disks (sort (copy-list (noctool::disk-list graph)) #'> :key #'noctool::disk-max)))
     (let ((image (image:make-image 350 (+ 130 (* 10 lines)))))
       (image:rect image 0 0 349 (1- (image::height image)) t 192 192 192)
-      (multiple-value-bind (percentile max scale) (show (noctool::disk-graph (car disks)) image nil :color '(0 0 0 0.0) :base-x 25 :base-y 110 :height 100 :selector selector)
+      (multiple-value-bind (percentile max scale)
+	  (show (noctool::disk-graph (car disks)) image nil
+		:color '(0 0 0 0.0) :base-x 25 :base-y 110 :height 100
+		:selector selector)
+	(graph-ignore percentile)
 	(draw-grid image max (interval graph) selector scale "b" 3 (noctool:last-updated graph))
 	(loop for disk in disks
 	      for color in *graph-colors*
@@ -117,5 +136,6 @@
       image)))
 
 (defmethod show :around ((graph noctool::monitor) (sink string) format &key (selector :short) scale &allow-other-keys)
+  (graph-ignore selector scale)
   (let ((image (call-next-method)))
     (image:export-to-gif image sink)))




More information about the noctool-cvs mailing list