<commit_before>import React from 'react'
import {assign} from 'lodash'
import {addons} from 'react/addons'

import Component from '../Component'

import styles from './Level.css'
import PercentInput from '../elements/PercentInput'
import {cerebralPropTypes, Cerebral} from '../utils'

@Cerebral(props => ({
  level: props.systemPath.concat(['level'])
}))
class Level extends Component {
  onChange (value) {
    addons.Perf.start()
    this.props.signals.levelChanged(true, {
      systemPath: this.props.systemPath,
      level: value
    })
  }

  render () {
    addons.Perf.stop()
    // addons.Perf.printInclusive()
    // addons.Perf.printExclusive()
    // addons.Perf.printWasted()
    return (
      <div className={styles['level']}>
        @&nbsp;
        <span className='label label-info'>
          <PercentInput float={this.props.level} onChange={this.onChange.bind(this)}/>
        </span>
      </div>
    )
  }
}

Level.propTypes = assign({}, cerebralPropTypes, {level: React.PropTypes.number})

export default Level<commit_msg>caido: remove profiling code<commit_after>import React from 'react'
import {assign} from 'lodash'

import Component from '../Component'

import styles from './Level.css'
import PercentInput from '../elements/PercentInput'
import {cerebralPropTypes, Cerebral} from '../utils'

@Cerebral(props => ({
  level: props.systemPath.concat(['level'])
}))
class Level extends Component {
  onChange (value) {
    this.props.signals.levelChanged(true, {
      systemPath: this.props.systemPath,
      level: value
    })
  }

  render () {
    return (
      <div className={styles['level']}>
        @&nbsp;
        <span className='label label-info'>
          <PercentInput float={this.props.level} onChange={this.onChange.bind(this)}/>
        </span>
      </div>
    )
  }
}

Level.propTypes = assign({}, cerebralPropTypes, {level: React.PropTypes.number})

export default Level
{'fraction_non_alphanumeric': 0.15007816571130797, 'fraction_numerical': 0.0, 'mean_word_length': 3.3340857787810383, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '2203021', 'n_tokens_mistral': 605, 'n_tokens_neox': 591, 'n_words': 131}