<commit_before>package display

import (
	"fmt"

	"github.com/sjmudd/pstop/event"
	"github.com/sjmudd/pstop/i_s/processlist"
	"github.com/sjmudd/pstop/p_s/ps_table"
	tiwsbt "github.com/sjmudd/pstop/p_s/table_io_waits_summary_by_table"
)

type StdoutDisplay struct {
	DisplayHeading // embedded
	limit          int
}

// ClearAndFlush() does nothing for stdout
func (s *StdoutDisplay) ClearAndFlush() {
}

// print out to stdout the IO values
func (s *StdoutDisplay) DisplayIO(p ps_table.Tabler) {
	s.displayGeneric(p)
}

func (s *StdoutDisplay) DisplayMutex(p ps_table.Tabler) {
	s.displayGeneric(p)
}

func (s *StdoutDisplay) DisplayStages(p ps_table.Tabler) {
	s.displayGeneric(p)
}

func (s *StdoutDisplay) displayGeneric(p ps_table.Tabler) {
	fmt.Println(s.HeadingLine())
	fmt.Println(p.Description())
	fmt.Println(p.Headings())

	rows := p.Len()
	if s.limit > 0 && s.limit < rows {
		rows = s.limit
	}
	row_content := p.RowContent(rows)

	fmt.Println("rows:", rows)
	fmt.Println("s.limit:", s.limit)
	fmt.Println("len(row_content):", len(row_content))

	for k := range row_content {
		if row_content[k] != p.EmptyRowContent() {
			fmt.Println(row_content[k])
		}
	}

	fmt.Println(p.TotalRowContent())
}

func (s *StdoutDisplay) DisplayLocks(tlwsbt ps_table.Tabler) {
	fmt.Println(s.HeadingLine())
	fmt.Println(tlwsbt.Description())
	fmt.Println(tlwsbt.Headings())

	rows := tlwsbt.Len()
	if s.limit > 0 && s.limit < rows {<commit_msg>remove debug info<commit_after>package display

import (
	"fmt"

	"github.com/sjmudd/pstop/event"
	"github.com/sjmudd/pstop/i_s/processlist"
	"github.com/sjmudd/pstop/p_s/ps_table"
	tiwsbt "github.com/sjmudd/pstop/p_s/table_io_waits_summary_by_table"
)

type StdoutDisplay struct {
	DisplayHeading // embedded
	limit          int
}

// ClearAndFlush() does nothing for stdout
func (s *StdoutDisplay) ClearAndFlush() {
}

// print out to stdout the IO values
func (s *StdoutDisplay) DisplayIO(p ps_table.Tabler) {
	s.displayGeneric(p)
}

func (s *StdoutDisplay) DisplayMutex(p ps_table.Tabler) {
	s.displayGeneric(p)
}

func (s *StdoutDisplay) DisplayStages(p ps_table.Tabler) {
	s.displayGeneric(p)
}

func (s *StdoutDisplay) displayGeneric(p ps_table.Tabler) {
	fmt.Println(s.HeadingLine())
	fmt.Println(p.Description())
	fmt.Println(p.Headings())

	rows := p.Len()
	if s.limit > 0 && s.limit < rows {
		rows = s.limit
	}
	row_content := p.RowContent(rows)

	for k := range row_content {
		if row_content[k] != p.EmptyRowContent() {
			fmt.Println(row_content[k])
		}
	}

	fmt.Println(p.TotalRowContent())
}

func (s *StdoutDisplay) DisplayLocks(tlwsbt ps_table.Tabler) {
	fmt.Println(s.HeadingLine())
	fmt.Println(tlwsbt.Description())
	fmt.Println(tlwsbt.Headings())

	rows := tlwsbt.Len()
	if s.limit > 0 && s.limit < rows {
{'fraction_non_alphanumeric': 0.14781351644380195, 'fraction_numerical': 0.0014456089627755693, 'mean_word_length': 4.51394422310757, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3901126', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1126, 'n_words': 194}